pub struct Anchor { /* private fields */ }Expand description
A stable reference to a position in a Replica.
After its creation, an Anchor can be given to a Replica to
retrieve the current offset of the position it refers to, taking into
account all the edits that have been applied to the Replica in the
meantime.
This property makes Anchors useful to implement things like cursors and
selections in collaborative editing environments.
For more information, see the documentation of
Replica::create_anchor() and
Replica::resolve_anchor().
Trait Implementations§
source§impl<'de> Deserialize<'de> for Anchor
impl<'de> Deserialize<'de> for Anchor
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
source§impl PartialEq for Anchor
impl PartialEq for Anchor
impl Copy for Anchor
impl Eq for Anchor
impl StructuralPartialEq for Anchor
Auto Trait Implementations§
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnwindSafe for Anchor
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