pub struct CachedOptions {Show 28 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)>,
pub set_options: Vec<String>,
}Expand description
Cached options - a serializable subset of Options.
Excludes transient parsing-time fields like warnings, but DOES
persist set_options: it is load-bearing downstream, because
resolve_effective_booking_method gates on
set_options.contains("booking_method") to decide whether the
file-level option "booking_method" wins over the API default.
Dropping it across the cache round-trip silently re-books FIFO/LIFO
ledgers as STRICT on a cache hit (#1340).
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)>§set_options: Vec<String>Names of options the source explicitly set (e.g.
"booking_method"). Restored so downstream resolution that
distinguishes “file set this” from “inherited default” behaves
identically on a cache hit. See the struct-level note (#1340).
Trait Implementations§
Source§impl Archive for CachedOptions
impl Archive for CachedOptions
Source§const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
serialize. Read moreSource§type Archived = ArchivedCachedOptions
type Archived = ArchivedCachedOptions
Source§type Resolver = CachedOptionsResolver
type Resolver = CachedOptionsResolver
Source§impl Clone for CachedOptions
impl Clone for CachedOptions
Source§fn clone(&self) -> CachedOptions
fn clone(&self) -> CachedOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>
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
Auto Trait Implementations§
impl Freeze for CachedOptions
impl RefUnwindSafe for CachedOptions
impl Send for CachedOptions
impl Sync for CachedOptions
impl Unpin for CachedOptions
impl UnsafeUnpin for CachedOptions
impl UnwindSafe for CachedOptions
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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
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
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>
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>
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> 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>
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
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.