Enum IndexScope Copy item path Source pub enum IndexScope {
Relative(ID ),
Nested(ID ),
Root(Arc <str >),
}Expand description Struct describing context in which StickyIndex is placed. For items pointing inside of
the shared typed sequence it’s always [StickyIndex::Relative] which refers to a block ID
found under corresponding position.
In case when a containing collection is empty, there’s a no block ID that can be used as point
of reference. In that case we store either a parent collection root type name or its branch ID
instead (if collection is nested into another).
Using ID s guarantees that corresponding StickyIndex doesn’t shift under incoming
concurrent updates.
StickyIndex is relative to a given block ID . This happens whenever we set StickyIndex
somewhere inside the non-empty shared collection.
If a containing collection is a nested y-type, which is empty, this case allows us to
identify that nested type.
If a containing collection is a root-level y-type, which is empty, this case allows us to
identify that nested type.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Helper function for decoding 1st version of lib0 encoding.
Helper function for decoding 2nd version of lib0 encoding.
Deserialize this value from the given Serde deserializer.
Read more Helper function for encoding 1st version of lib0 encoding.
Helper function for encoding 2nd version of lib0 encoding.
Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Serialize this value into the given Serde serializer.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Checks if this value is equivalent to the given key.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.