pub struct TxnData { /* private fields */ }Implementations§
Source§impl TxnData
impl TxnData
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn try_from(
mdi_opt: Option<MetadataItem>,
txns: Txns,
settings: &Settings,
) -> Result<TxnData, Error>
pub fn try_from( mdi_opt: Option<MetadataItem>, txns: Txns, settings: &Settings, ) -> Result<TxnData, Error>
Try to create TxnData from set of transactions
§Errors
If resulting txn set is logically invalid, the method will return error
Sourcepub fn append(&mut self, txn_data: &mut TxnData) -> Result<&mut Self, Error>
pub fn append(&mut self, txn_data: &mut TxnData) -> Result<&mut Self, Error>
Append TxnData to existing TxnData
This will reset the Metadata of target TxnData
§Errors
Returns Err in case resulting txn set is invalid (e.g. there are missing UUIDs)
This could happen especially when Txns with Audit information are appended with
plain Txns without UUIDs.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TxnData
impl !Send for TxnData
impl !Sync for TxnData
impl !UnwindSafe for TxnData
impl Freeze for TxnData
impl Unpin for TxnData
impl UnsafeUnpin for TxnData
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