Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose timestamp::ensure function #275

Closed
milyin opened this issue Mar 10, 2024 · 3 comments
Closed

expose timestamp::ensure function #275

milyin opened this issue Mar 10, 2024 · 3 comments
Labels
api sync Synchronize API with other bindings

Comments

@milyin
Copy link
Contributor

milyin commented Mar 10, 2024

Describe the release item

This function was not exposed to zenoh-c because zenoh-c have only R/O access to sample. Consider if it can be added now

    /// Ensure that an associated Timestamp is present in this Sample.
    /// If not, a new one is created with the current system time and 0x00 as id.
    /// Get the timestamp of this sample (either existing one or newly created)
    // tags{rust.sample.ensure_timestamp, api.sample.timestamp.ensure}
    pub fn ensure_timestamp(&mut self) -> &Timestamp {
        if let Some(ref timestamp) = self.timestamp {
            timestamp
        } else {
            let timestamp = new_reception_timestamp();
            self.timestamp = Some(timestamp);
            self.timestamp.as_ref().unwrap()
        }
    }
@milyin milyin added the release Part of the next release label Mar 10, 2024
@milyin milyin moved this to Backlog in Zenoh 1.0.0 release Mar 12, 2024
@milyin milyin removed the release Part of the next release label Mar 12, 2024
@milyin
Copy link
Contributor Author

milyin commented Mar 12, 2024

first it have to be renamed: eclipse-zenoh/zenoh#810

@milyin milyin added the api sync Synchronize API with other bindings label Mar 12, 2024
@DenisBiryukov91
Copy link
Contributor

Since we are moving to the concept of read-only Sample, this functionality is likely not needed to be exposed in zenoh-c.
Similar method is expected to be tagged as unstable and hidden in zenoh rust (see eclipse-zenoh/zenoh#822).

@milyin
Copy link
Contributor Author

milyin commented Mar 27, 2024

This function is removed in eclipse-zenoh/zenoh#806

@milyin milyin closed this as completed Mar 27, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Zenoh 1.0.0 release Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api sync Synchronize API with other bindings
Projects
Status: Done
Development

No branches or pull requests

2 participants