pub struct Settings {
pub price: Price,
/* private fields */
}Fields§
§price: PriceImplementations§
Source§impl Settings
impl Settings
pub fn default_audit() -> Self
pub fn default_extid() -> Self
Source§impl Settings
impl Settings
Sourcepub fn get_commodity(&self, name: &str) -> Result<Arc<Commodity>, Error>
pub fn get_commodity(&self, name: &str) -> Result<Arc<Commodity>, Error>
§Errors
Returns reference for commodity, error if it doesn’t exist
pub fn get_price_lookup(&self) -> PriceLookup
pub fn input(&self) -> InputSettings
Source§impl Settings
impl Settings
Sourcepub fn parse_timestamp(&mut self, ts: &str) -> Result<Zoned, Error>
pub fn parse_timestamp(&mut self, ts: &str) -> Result<Zoned, Error>
Parse timestamp in tackler-accepted format:
Date (YYYY-MM-DD) Date-Time (YYYY-MM-DDTHH:MM:SS[.SSS]) Date-Time-Zulu (YYYY-MM-DDTHH:MM:SS[.SSS]Z) Date-Time-Offset (YYYY-MM-DDTHH:MM:SS[.SSS]+-HH:MM)
Fractional seconds are supported up to nanosecond
§Errors
Return Err timestamp is invalid
Sourcepub fn get_offset_datetime(&self, dt: DateTime) -> Result<Zoned, Error>
pub fn get_offset_datetime(&self, dt: DateTime) -> Result<Zoned, Error>
§Errors
Return Err if conversion to zone is not possible
Sourcepub fn get_offset_date(&self, date: Date) -> Result<Zoned, Error>
pub fn get_offset_date(&self, date: Date) -> Result<Zoned, Error>
§Errors
Return Err if conversion to timestamp is not possible
pub fn get_report_commodity(&self) -> Option<Arc<Commodity>>
pub fn get_report_targets(&self) -> Vec<ReportType>
pub fn get_export_targets(&self) -> Vec<ExportType>
pub fn get_balance_ras(&self) -> Vec<String>
pub fn get_balance_group_ras(&self) -> Vec<String>
pub fn get_register_ras(&self) -> Vec<String>
pub fn get_equity_ras(&self) -> Vec<String>
Trait Implementations§
Source§impl TryFrom<&Settings> for BalanceSettings
impl TryFrom<&Settings> for BalanceSettings
Source§impl TryFrom<&Settings> for BalanceGroupSettings
impl TryFrom<&Settings> for BalanceGroupSettings
Source§impl TryFrom<&Settings> for RegisterSettings
impl TryFrom<&Settings> for RegisterSettings
Auto Trait Implementations§
impl !RefUnwindSafe for Settings
impl !Send for Settings
impl !Sync for Settings
impl !UnwindSafe for Settings
impl Freeze for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
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