pub struct Message<T = String> { /* private fields */ }Implementations§
Source§impl<T> Message<T>
impl<T> Message<T>
pub fn new(value: T) -> Self
pub fn clear(&mut self)
pub fn data(&self) -> Option<&T>
pub fn data_mut(&mut self) -> Option<&mut T>
pub fn id(&self) -> usize
pub fn set_data(&mut self, data: Option<T>)
pub fn timestamp(&self) -> Timestamp
pub fn with_data(self, data: T) -> Self
Trait Implementations§
Source§impl<T: Ord> Ord for Message<T>
impl<T: Ord> Ord for Message<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for Message<T>
impl<T: PartialOrd> PartialOrd for Message<T>
impl<T: Eq> Eq for Message<T>
impl<T> StructuralPartialEq for Message<T>
Auto Trait Implementations§
impl<T> Freeze for Message<T>where
T: Freeze,
impl<T> RefUnwindSafe for Message<T>where
T: RefUnwindSafe,
impl<T> Send for Message<T>where
T: Send,
impl<T> Sync for Message<T>where
T: Sync,
impl<T> Unpin for Message<T>where
T: Unpin,
impl<T> UnwindSafe for Message<T>where
T: UnwindSafe,
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