Struct loro_internal::change::Change
source · pub struct Change<O = Op> {
pub ops: RleVec<[O; 1]>,
pub deps: Frontiers,
pub id: ID,
pub lamport: Lamport,
pub timestamp: Timestamp,
pub has_dependents: bool,
}Expand description
Fields§
§ops: RleVec<[O; 1]>§deps: Frontiers§id: IDid of the first op in the change
lamport: LamportLamport timestamp of the change. It can be calculated from deps
timestamp: TimestampUnix time It is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970.
has_dependents: boolif it has dependents, it cannot merge with new changes
Implementations§
source§impl<O> Change<O>
impl<O> Change<O>
pub fn new( ops: RleVec<[O; 1]>, deps: Frontiers, id: ID, lamport: Lamport, timestamp: Timestamp ) -> Self
pub fn ops(&self) -> &RleVec<[O; 1]>
pub fn peer(&self) -> PeerID
pub fn lamport(&self) -> Lamport
pub fn timestamp(&self) -> Timestamp
pub fn id(&self) -> ID
pub fn deps_on_self(&self) -> bool
Trait Implementations§
source§impl<O: Mergable + HasLength + HasIndex + Debug> HasLength for Change<O>
impl<O: Mergable + HasLength + HasIndex + Debug> HasLength for Change<O>
source§fn content_len(&self) -> usize
fn content_len(&self) -> usize
It is the length of the content, i.e. the length when no Mergable::merge ever happen. Read more
Auto Trait Implementations§
impl<O> RefUnwindSafe for Change<O>where O: RefUnwindSafe,
impl<O> Send for Change<O>where O: Send,
impl<O> Sync for Change<O>where O: Sync,
impl<O> Unpin for Change<O>where O: Unpin,
impl<O> UnwindSafe for Change<O>where O: UnwindSafe + RefUnwindSafe,
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> HasCounterSpan for Twhere
T: HasCounter + HasLength,
impl<T> HasCounterSpan for Twhere T: HasCounter + HasLength,
source§impl<T> HasIdSpan for Twhere
T: HasId + HasLength,
impl<T> HasIdSpan for Twhere T: HasId + HasLength,
source§impl<T> HasLamportSpan for Twhere
T: HasLamport + HasLength,
impl<T> HasLamportSpan for Twhere T: HasLamport + HasLength,
source§fn lamport_end(&self) -> u32
fn lamport_end(&self) -> u32
end is the exclusive end, last the inclusive end.
source§fn lamport_last(&self) -> u32
fn lamport_last(&self) -> u32
end is the exclusive end, last the inclusive end.