Struct loro_internal::version::PatchedVersionVector
source · pub struct PatchedVersionVector {
pub base: Arc<VersionVector>,
pub patch: VersionVector,
}
Fields§
§base: Arc<VersionVector>
§patch: VersionVector
Implementations§
source§impl PatchedVersionVector
impl PatchedVersionVector
pub fn new(base: Arc<VersionVector>) -> Self
pub fn is_empty(&self) -> bool
pub fn from_version(base: &Arc<VersionVector>, version: &VersionVector) -> Self
pub fn extend_to_include_last_id(&mut self, id: ID)
pub fn set_end(&mut self, id: ID)
pub fn set_last(&mut self, id: ID)
pub fn extend_to_include(&mut self, span: IdSpan)
pub fn shrink_to_exclude(&mut self, span: IdSpan)
pub fn forward(&mut self, spans: &IdSpanVector)
pub fn retreat(&mut self, spans: &IdSpanVector)
pub fn get(&self, client_id: &PeerID) -> Option<&Counter>
pub fn insert(&mut self, client_id: PeerID, counter: Counter)
pub fn includes_id(&self, id: ID) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&PeerID, &Counter)>
pub fn sub_iter<'a>( &'a self, rhs: &'a Self ) -> impl Iterator<Item = IdSpan> + 'a
pub fn diff_iter<'a>( &'a self, rhs: &'a Self ) -> (impl Iterator<Item = IdSpan> + 'a, impl Iterator<Item = IdSpan> + 'a)
Trait Implementations§
source§impl Clone for PatchedVersionVector
impl Clone for PatchedVersionVector
source§impl Debug for PatchedVersionVector
impl Debug for PatchedVersionVector
source§impl Default for PatchedVersionVector
impl Default for PatchedVersionVector
source§fn default() -> PatchedVersionVector
fn default() -> PatchedVersionVector
Returns the “default value” for a type. Read more
source§impl From<PatchedVersionVector> for VersionVector
impl From<PatchedVersionVector> for VersionVector
source§fn from(v: PatchedVersionVector) -> Self
fn from(v: PatchedVersionVector) -> Self
Converts to this type from the input type.
source§impl PartialEq for PatchedVersionVector
impl PartialEq for PatchedVersionVector
source§impl PartialOrd for PatchedVersionVector
impl PartialOrd for PatchedVersionVector
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 moreAuto Trait Implementations§
impl Freeze for PatchedVersionVector
impl RefUnwindSafe for PatchedVersionVector
impl Send for PatchedVersionVector
impl Sync for PatchedVersionVector
impl Unpin for PatchedVersionVector
impl UnwindSafe for PatchedVersionVector
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