pub struct DataMessage { /* private fields */ }Expand description
Zenoh-Flow data message.
It contains the actual data, the timestamp associated, the end to end deadline, the end to end deadline misses and loop contexts.
Implementations§
Source§impl DataMessage
impl DataMessage
Sourcepub fn new_serialized(data: Vec<u8>, timestamp: Timestamp) -> Self
pub fn new_serialized(data: Vec<u8>, timestamp: Timestamp) -> Self
Creates a new message from serialized data.
This is used when the message is coming from Zenoh or from a non-rust node.
Sourcepub fn get_timestamp(&self) -> &Timestamp
pub fn get_timestamp(&self) -> &Timestamp
Return the Timestamp associated with this DataMessage.
Trait Implementations§
Source§impl Clone for DataMessage
impl Clone for DataMessage
Source§fn clone(&self) -> DataMessage
fn clone(&self) -> DataMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataMessage
impl Debug for DataMessage
Source§impl Deref for DataMessage
impl Deref for DataMessage
Source§impl<'de> Deserialize<'de> for DataMessage
impl<'de> Deserialize<'de> for DataMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<DataMessage> for Payload
impl From<DataMessage> for Payload
Source§fn from(data_message: DataMessage) -> Self
fn from(data_message: DataMessage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DataMessage
impl !RefUnwindSafe for DataMessage
impl Send for DataMessage
impl Sync for DataMessage
impl Unpin for DataMessage
impl !UnwindSafe for DataMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more