pub struct Delta { /* private fields */ }Expand description
The parts of a document some set of changes touched. See the module docs.
Implementations§
Source§impl Delta
impl Delta
Sourcepub fn everything() -> Self
pub fn everything() -> Self
An unknown change: every reader re-reads everything.
Sourcepub fn merge(&mut self, other: Self)
pub fn merge(&mut self, other: Self)
Add what other touched, so the deltas of several syncs read as one.
Sourcepub fn is_everything(&self) -> bool
pub fn is_everything(&self) -> bool
The change is unknown: readers must re-read everything.
Source§impl Delta
impl Delta
Sourcepub fn from_changes(
doc: &Doc,
changes: &[Change],
locate: &dyn Fn(&ObjId) -> Option<ObjPath>,
) -> Self
pub fn from_changes( doc: &Doc, changes: &[Change], locate: &dyn Fn(&ObjId) -> Option<ObjPath>, ) -> Self
The delta changes make to doc (which already holds them), read from
their operations: each touched object, and the path to it. Paths come
from locate when it knows the object, from the changes themselves
for objects they create, and otherwise from the document.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Delta
impl Freeze for Delta
impl Move for Delta
impl RefUnwindSafe for Delta
impl Send for Delta
impl Sync for Delta
impl Unpin for Delta
impl UnsafeUnpin for Delta
impl UnwindSafe for Delta
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more