pub struct MessageOrderKey {
pub time: SystemTime,
pub id: MessageId,
}Expand description
The total order MessagesV1::apply_delta retains by: it sorts ascending
on (time, id) and keeps the newest max_recent_messages, so this key
alone decides whether a message survives a merge.
id breaks ties deterministically; without it two messages sharing a
timestamp would order differently on different peers.
Fields§
§time: SystemTime§id: MessageIdTrait Implementations§
Source§impl Clone for MessageOrderKey
impl Clone for MessageOrderKey
Source§fn clone(&self) -> MessageOrderKey
fn clone(&self) -> MessageOrderKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MessageOrderKey
impl Debug for MessageOrderKey
Source§impl<'de> Deserialize<'de> for MessageOrderKey
impl<'de> Deserialize<'de> for MessageOrderKey
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
impl Eq for MessageOrderKey
Source§impl Ord for MessageOrderKey
impl Ord for MessageOrderKey
Source§fn cmp(&self, other: &MessageOrderKey) -> Ordering
fn cmp(&self, other: &MessageOrderKey) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MessageOrderKey
impl PartialEq for MessageOrderKey
Source§impl PartialOrd for MessageOrderKey
impl PartialOrd for MessageOrderKey
Source§impl Serialize for MessageOrderKey
impl Serialize for MessageOrderKey
impl StructuralPartialEq for MessageOrderKey
Auto Trait Implementations§
impl Freeze for MessageOrderKey
impl RefUnwindSafe for MessageOrderKey
impl Send for MessageOrderKey
impl Sync for MessageOrderKey
impl Unpin for MessageOrderKey
impl UnsafeUnpin for MessageOrderKey
impl UnwindSafe for MessageOrderKey
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