Struct aper::data_structures::List [−][src]
pub struct List<T: StateMachine + PartialEq> { /* fields omitted */ }
Expand description
Represents a list of items, similar to a Vec
, but designed to be robust
to concurrent modifications from multiple users.
Implementations
Construct an OperationWithId representing appending the given object to this list.
Construct a OperationWithId representing prepending the given object to this list.
Construct a OperationWithId representing inserting the given object at the given location in this list.
Construct a ListOperation representing deleting the object given (by id) in this list.
Construct a ListOperation representing moving an object already in this list to the given location in the list.
pub fn map_item(
&self,
id: Uuid,
fun: impl FnOnce(&T) -> <T as StateMachine>::Transition
) -> <Self as StateMachine>::Transition
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
type Transition = ListOperation<T>
type Transition = ListOperation<T>
The StateMachine::Transition
type associates another type with this state machine
as its transitions. Read more
type Conflict = ListConflict<T>
Update the state machine according to the given [Transition
]. This method must be
deterministic: calling it on a clone of the state with a clone of the [Transition
]
must result in the same state, even at a different time and on a different machine. This
is the requirement that allows Aper to keep the state in sync across multiple machines. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for List<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for List<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more