pub struct Substance {
pub amount: Number,
pub properties: Arc<Properties>,
}
Fields§
§amount: Number
§properties: Arc<Properties>
Implementations§
Source§impl Substance
impl Substance
pub fn rename(self, name: String) -> Substance
pub fn get(&self, name: &str) -> Result<Number, SubstanceGetError>
Sourcepub fn get_in_unit(
&self,
unit: Number,
context: &Context,
bottom_name: BTreeMap<String, isize>,
bottom_const: Numeric,
base: u8,
digits: Digits,
) -> Result<SubstanceReply, String>
pub fn get_in_unit( &self, unit: Number, context: &Context, bottom_name: BTreeMap<String, isize>, bottom_const: Numeric, base: u8, digits: Digits, ) -> Result<SubstanceReply, String>
Analogous to Context::show()
pub fn to_reply(&self, context: &Context) -> Result<SubstanceReply, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Substance
impl RefUnwindSafe for Substance
impl Send for Substance
impl Sync for Substance
impl Unpin for Substance
impl UnwindSafe for Substance
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