pub struct CachedOptions {Show 27 fields
pub title: Option<String>,
pub filename: Option<String>,
pub operating_currency: Vec<String>,
pub name_assets: String,
pub name_liabilities: String,
pub name_equity: String,
pub name_income: String,
pub name_expenses: String,
pub account_rounding: Option<String>,
pub account_previous_balances: String,
pub account_previous_earnings: String,
pub account_previous_conversions: String,
pub account_current_earnings: String,
pub account_current_conversions: Option<String>,
pub account_unrealized_gains: Option<String>,
pub conversion_currency: Option<String>,
pub inferred_tolerance_default: Vec<(String, String)>,
pub inferred_tolerance_multiplier: String,
pub infer_tolerance_from_cost: bool,
pub use_legacy_fixed_tolerances: bool,
pub experiment_explicit_tolerances: bool,
pub booking_method: String,
pub render_commas: bool,
pub allow_pipe_separator: bool,
pub long_string_maxlines: u32,
pub documents: Vec<String>,
pub custom: Vec<(String, String)>,
}Expand description
Cached options - a serializable subset of Options.
Excludes parsing-time fields like set_options and warnings.
These fields mirror the Options struct and inherit their meaning.
Fields§
§title: Option<String>§filename: Option<String>§operating_currency: Vec<String>§name_assets: String§name_liabilities: String§name_equity: String§name_income: String§name_expenses: String§account_rounding: Option<String>§account_previous_balances: String§account_previous_earnings: String§account_previous_conversions: String§account_current_earnings: String§account_current_conversions: Option<String>§account_unrealized_gains: Option<String>§conversion_currency: Option<String>§inferred_tolerance_default: Vec<(String, String)>Stored as (currency, tolerance_string) pairs since Decimal needs special handling
inferred_tolerance_multiplier: String§infer_tolerance_from_cost: bool§use_legacy_fixed_tolerances: bool§experiment_explicit_tolerances: bool§booking_method: String§render_commas: bool§allow_pipe_separator: bool§long_string_maxlines: u32§documents: Vec<String>§custom: Vec<(String, String)>Trait Implementations§
Source§impl Archive for CachedOptions
impl Archive for CachedOptions
Source§const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
An optimization flag that allows the bytes of this type to be copied
directly to a writer instead of calling
serialize. Read moreSource§type Archived = ArchivedCachedOptions
type Archived = ArchivedCachedOptions
The archived representation of this type. Read more
Source§type Resolver = CachedOptionsResolver
type Resolver = CachedOptionsResolver
The resolver for this type. It must contain all the additional
information from serializing needed to make the archived type from
the normal type.
Source§impl Clone for CachedOptions
impl Clone for CachedOptions
Source§fn clone(&self) -> CachedOptions
fn clone(&self) -> CachedOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 CachedOptions
impl Debug for CachedOptions
Source§impl<__D: Fallible + ?Sized> Deserialize<CachedOptions, __D> for Archived<CachedOptions>where
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
Vec<String>: Archive,
<Vec<String> as Archive>::Archived: Deserialize<Vec<String>, __D>,
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Vec<(String, String)>: Archive,
<Vec<(String, String)> as Archive>::Archived: Deserialize<Vec<(String, String)>, __D>,
bool: Archive,
<bool as Archive>::Archived: Deserialize<bool, __D>,
u32: Archive,
<u32 as Archive>::Archived: Deserialize<u32, __D>,
impl<__D: Fallible + ?Sized> Deserialize<CachedOptions, __D> for Archived<CachedOptions>where
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
Vec<String>: Archive,
<Vec<String> as Archive>::Archived: Deserialize<Vec<String>, __D>,
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Vec<(String, String)>: Archive,
<Vec<(String, String)> as Archive>::Archived: Deserialize<Vec<(String, String)>, __D>,
bool: Archive,
<bool as Archive>::Archived: Deserialize<bool, __D>,
u32: Archive,
<u32 as Archive>::Archived: Deserialize<u32, __D>,
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<CachedOptions, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<CachedOptions, <__D as Fallible>::Error>
Deserializes using the given deserializer
Source§impl From<&Options> for CachedOptions
impl From<&Options> for CachedOptions
Source§impl From<CachedOptions> for Options
impl From<CachedOptions> for Options
Source§fn from(cached: CachedOptions) -> Self
fn from(cached: CachedOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CachedOptions
impl RefUnwindSafe for CachedOptions
impl Send for CachedOptions
impl Sync for CachedOptions
impl Unpin for CachedOptions
impl UnwindSafe for CachedOptions
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
Creates the archived version of the metadata for this value.
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.