pub struct CanvasTransaction {
pub commands: Vec<DocumentCommand>,
pub metadata: CanvasValue,
}Fields§
§commands: Vec<DocumentCommand>§metadata: CanvasValueImplementations§
Source§impl CanvasTransaction
impl CanvasTransaction
pub fn record_changes(&self) -> impl Iterator<Item = CanvasRecordChange> + '_
pub fn record_ids(&self) -> impl Iterator<Item = CanvasRecordId> + '_
pub fn record_operations( &self, transaction_sequence: u64, ) -> impl Iterator<Item = CanvasRecordOperation> + '_
pub fn record_operation_batch( &self, transaction_sequence: u64, ) -> CanvasRecordOperationBatch
Source§impl CanvasTransaction
impl CanvasTransaction
pub fn new(commands: impl IntoIterator<Item = DocumentCommand>) -> Self
pub fn single(command: DocumentCommand) -> Self
pub fn push(&mut self, command: DocumentCommand)
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for CanvasTransaction
impl Clone for CanvasTransaction
Source§fn clone(&self) -> CanvasTransaction
fn clone(&self) -> CanvasTransaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CanvasTransaction
impl Debug for CanvasTransaction
Source§impl Default for CanvasTransaction
impl Default for CanvasTransaction
Source§fn default() -> CanvasTransaction
fn default() -> CanvasTransaction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CanvasTransaction
impl<'de> Deserialize<'de> for CanvasTransaction
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 From<DocumentCommand> for CanvasTransaction
impl From<DocumentCommand> for CanvasTransaction
Source§fn from(value: DocumentCommand) -> Self
fn from(value: DocumentCommand) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CanvasTransaction
impl PartialEq for CanvasTransaction
Source§fn eq(&self, other: &CanvasTransaction) -> bool
fn eq(&self, other: &CanvasTransaction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CanvasTransaction
impl Serialize for CanvasTransaction
impl StructuralPartialEq for CanvasTransaction
Auto Trait Implementations§
impl Freeze for CanvasTransaction
impl RefUnwindSafe for CanvasTransaction
impl Send for CanvasTransaction
impl Sync for CanvasTransaction
impl Unpin for CanvasTransaction
impl UnsafeUnpin for CanvasTransaction
impl UnwindSafe for CanvasTransaction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().