Struct loro_internal::id::ID
source · pub struct ID {
pub peer: u64,
pub counter: i32,
}
Fields§
§peer: u64
§counter: i32
Implementations§
source§impl ID
impl ID
pub const fn new(peer: u64, counter: i32) -> ID
pub fn new_root() -> ID
pub fn is_null(&self) -> bool
pub fn to_span(&self, len: usize) -> IdSpan
pub fn unknown(counter: i32) -> ID
pub fn is_unknown(&self) -> bool
pub fn inc(&self, inc: i32) -> ID
pub fn contains(&self, len: i32, target: ID) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for ID
impl<'de> Deserialize<'de> for ID
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ID, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ID, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromIterator<ID> for Frontiers
impl FromIterator<ID> for Frontiers
source§impl FromIterator<ID> for VersionVector
impl FromIterator<ID> for VersionVector
source§impl Ord for ID
impl Ord for ID
source§impl PartialOrd for ID
impl PartialOrd for ID
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ID
impl Serialize for ID
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ID
impl Eq for ID
impl StructuralPartialEq for ID
Auto Trait Implementations§
impl Freeze for ID
impl RefUnwindSafe for ID
impl Send for ID
impl Sync for ID
impl Unpin for ID
impl UnwindSafe for ID
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