pub struct Txdata<T> {
pub inputs: Option<Inputs>,
pub outputs: Option<Outputs>,
pub mutations: Option<Mutations<T>>,
}Expand description
The canonical payload format of a crate::Commitlog.
This type may eventually be defined in the core datastore crate.
Fields§
§inputs: Option<Inputs>§outputs: Option<Outputs>§mutations: Option<Mutations<T>>Implementations§
Source§impl<T: Encode> Txdata<T>
impl<T: Encode> Txdata<T>
pub const VERSION: u8 = 1u8
pub fn encode(&self, buf: &mut impl BufWriter)
Sourcepub fn decode<'a, V, R>(
visitor: &mut V,
reader: &mut R,
) -> Result<Self, V::Error>
pub fn decode<'a, V, R>( visitor: &mut V, reader: &mut R, ) -> Result<Self, V::Error>
Decode Self from the given buffer.
Sourcepub fn consume<'a, V, R>(
visitor: &mut V,
reader: &mut R,
) -> Result<(), V::Error>
pub fn consume<'a, V, R>( visitor: &mut V, reader: &mut R, ) -> Result<(), V::Error>
Variant of Self::decode which doesn’t allocate Self.
Useful for folding traversals where the visitor state suffices.
Note that both Inputs and Outputs are still allocated to satisfy
the Visitor trait, but Mutations aren’t.
pub fn skip<'a, V, R>(visitor: &mut V, reader: &mut R) -> Result<(), V::Error>
Trait Implementations§
Source§impl<T: Encode> Encode for Txdata<T>
impl<T: Encode> Encode for Txdata<T>
Source§fn encode_record<W: BufWriter>(&self, writer: &mut W)
fn encode_record<W: BufWriter>(&self, writer: &mut W)
Encode
self to the given buffer.impl<T> StructuralPartialEq for Txdata<T>
Auto Trait Implementations§
impl<T> Freeze for Txdata<T>
impl<T> RefUnwindSafe for Txdata<T>where
T: RefUnwindSafe,
impl<T> Send for Txdata<T>
impl<T> Sync for Txdata<T>
impl<T> Unpin for Txdata<T>
impl<T> UnwindSafe for Txdata<T>where
T: RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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