pub trait Duplicatable: Clone {
// Required methods
fn get_id(&self) -> String;
fn set_id(&mut self, id: String);
fn get_field(&self, field: &str) -> Option<String>;
fn set_field(&mut self, field: &str, value: &str);
fn get_amount(&self) -> Option<Decimal>;
fn set_amount(&mut self, amount: Decimal);
fn get_date(&self) -> Option<NaiveDate>;
fn set_date(&mut self, date: NaiveDate);
}Expand description
Trait for records that can be duplicated.
Required Methods§
Sourcefn get_amount(&self) -> Option<Decimal>
fn get_amount(&self) -> Option<Decimal>
Gets the amount (for amount-bearing records).
Sourcefn set_amount(&mut self, amount: Decimal)
fn set_amount(&mut self, amount: Decimal)
Sets the amount.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.