pub struct MemorySerializer { /* private fields */ }Implementations§
Source§impl MemorySerializer
impl MemorySerializer
pub fn new() -> Self
pub fn set_context( &mut self, context_type: ContextType, primary_entity_type: EntityType, )
pub fn set_primary(&mut self, entity_idx: u32)
pub fn add_string(&mut self, s: &str) -> (u32, u16)
pub fn add_transaction( &mut self, id: [u8; 16], parent_idx: i32, is_primary: bool, is_context: bool, post_date: i64, enter_date: i64, split_count: u32, tag_count: u32, is_multi_currency: bool, ) -> u32
pub fn add_split( &mut self, id: [u8; 16], parent_idx: i32, is_primary: bool, is_context: bool, account_id: [u8; 16], commodity_id: [u8; 16], value_num: i64, value_denom: i64, reconcile_state: u8, reconcile_date: i64, ) -> u32
pub fn add_tag( &mut self, id: [u8; 16], parent_idx: i32, is_primary: bool, is_context: bool, name: &str, value: &str, ) -> u32
pub fn add_account( &mut self, id: [u8; 16], parent_idx: i32, is_primary: bool, is_context: bool, parent_account_id: [u8; 16], name: &str, path: &str, tag_count: u32, ) -> u32
pub fn add_commodity( &mut self, id: [u8; 16], parent_idx: i32, is_primary: bool, is_context: bool, symbol: &str, name: &str, tag_count: u32, ) -> u32
pub fn entity_count(&self) -> u32
pub fn add_transaction_from( &mut self, tx: &Transaction, is_primary: bool, split_count: u32, tag_count: u32, is_multi_currency: bool, ) -> u32
pub fn add_split_from(&mut self, split: &Split, parent_idx: i32) -> u32
pub fn finalize(self, output_size: u32) -> Vec<u8> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemorySerializer
impl RefUnwindSafe for MemorySerializer
impl Send for MemorySerializer
impl Sync for MemorySerializer
impl Unpin for MemorySerializer
impl UnsafeUnpin for MemorySerializer
impl UnwindSafe for MemorySerializer
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more