pub struct Operations<E: Entity> { /* private fields */ }Expand description
A collection of multiple Operations.
Implementations§
Source§impl<E: Entity> Operations<E>
impl<E: Entity> Operations<E>
Sourcepub fn from_operations(ops: Vec<Operation<E>>) -> Result<Self, Error<E>>
pub fn from_operations(ops: Vec<Operation<E>>) -> Result<Self, Error<E>>
Create a new Operations from a simple vector of single Operations.
§Errors
- If the first operation in
opsis not actually a root operation (seeOperationData::is_rootfor how we determine this.) - If the
opsare empty.
Source§impl<T: Entity> Operations<T>
Treat this collection of operations as a vector.
impl<T: Entity> Operations<T>
Treat this collection of operations as a vector.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Delegate for Vec<T>::len.
Sourcepub fn iter(&self) -> <&Self as IntoIterator>::IntoIter
pub fn iter(&self) -> <&Self as IntoIterator>::IntoIter
Delegate for iter on the underlying Vec .
Trait Implementations§
Source§impl<'de, E: Entity> Deserialize<'de> for Operations<E>
impl<'de, E: Entity> Deserialize<'de> for Operations<E>
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<'a, E: Entity> IntoIterator for &'a Operations<E>
impl<'a, E: Entity> IntoIterator for &'a Operations<E>
Source§type IntoIter = Chain<Once<<&'a Operations<E> as IntoIterator>::Item>, <&'a Vec<Operation<E>> as IntoIterator>::IntoIter>
type IntoIter = Chain<Once<<&'a Operations<E> as IntoIterator>::Item>, <&'a Vec<Operation<E>> as IntoIterator>::IntoIter>
Which kind of iterator are we turning this into?
Source§impl<E: Entity> IntoIterator for Operations<E>
impl<E: Entity> IntoIterator for Operations<E>
Source§type IntoIter = Chain<Once<<Operations<E> as IntoIterator>::Item>, <Vec<Operation<E>> as IntoIterator>::IntoIter>
type IntoIter = Chain<Once<<Operations<E> as IntoIterator>::Item>, <Vec<Operation<E>> as IntoIterator>::IntoIter>
Which kind of iterator are we turning this into?
Source§impl<E: Entity> Serialize for Operations<E>
impl<E: Entity> Serialize for Operations<E>
Auto Trait Implementations§
impl<E> Freeze for Operations<E>
impl<E> RefUnwindSafe for Operations<E>
impl<E> Send for Operations<E>
impl<E> Sync for Operations<E>
impl<E> Unpin for Operations<E>
impl<E> UnwindSafe for Operations<E>
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