pub struct BondLength { /* private fields */ }Expand description
A positive displayable bond length.
Implementations§
Source§impl BondLength
impl BondLength
Sourcepub fn new(value: f64, unit: &str) -> Result<Self, BondValidationError>
pub fn new(value: f64, unit: &str) -> Result<Self, BondValidationError>
Creates a bond length.
§Errors
Returns BondValidationError::NonFiniteBondLength when value is not finite,
BondValidationError::NonPositiveBondLength when value is zero or negative, or
BondValidationError::EmptyLengthUnit when unit is empty after trimming.
Trait Implementations§
Source§impl Clone for BondLength
impl Clone for BondLength
Source§fn clone(&self) -> BondLength
fn clone(&self) -> BondLength
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BondLength
impl Debug for BondLength
Source§impl Display for BondLength
impl Display for BondLength
Source§impl PartialEq for BondLength
impl PartialEq for BondLength
Source§fn eq(&self, other: &BondLength) -> bool
fn eq(&self, other: &BondLength) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BondLength
Auto Trait Implementations§
impl Freeze for BondLength
impl RefUnwindSafe for BondLength
impl Send for BondLength
impl Sync for BondLength
impl Unpin for BondLength
impl UnsafeUnpin for BondLength
impl UnwindSafe for BondLength
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