pub struct SequencePointer(/* private fields */);Expand description
A pointer that can advance through sibling sequence IDs.
SequencePointer is the only mechanism for creating new SequenceIds within a universe.
Implementations§
Source§impl SequencePointer
impl SequencePointer
Sourcepub fn advance(&mut self) -> SequenceId
pub fn advance(&mut self) -> SequenceId
Advances to the next sibling sequence and returns the current one.
§Ownership
This method requires &mut self because it advances the internal state
to point to the next sibling position.
Sourcepub fn downgrade(self) -> SequenceId
pub fn downgrade(self) -> SequenceId
Converts this pointer into its current SequenceId, consuming the pointer.
This method is useful when you want to access the current SequenceId without advancing to the next sibling. Once downgraded, you cannot create additional siblings from this pointer.
Auto Trait Implementations§
impl Freeze for SequencePointer
impl !RefUnwindSafe for SequencePointer
impl Send for SequencePointer
impl Sync for SequencePointer
impl Unpin for SequencePointer
impl !UnwindSafe for SequencePointer
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> 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