pub struct DiversityIndex { /* private fields */ }Implementations§
Source§impl DiversityIndex
impl DiversityIndex
Sourcepub fn new(
kind: DiversityIndexKind,
value: f64,
) -> Result<Self, BiodiversityValueError>
pub fn new( kind: DiversityIndexKind, value: f64, ) -> Result<Self, BiodiversityValueError>
§Errors
Returns BiodiversityValueError::NonFinite when value is not finite.
pub const fn kind(&self) -> &DiversityIndexKind
pub const fn value(&self) -> f64
Trait Implementations§
Source§impl Clone for DiversityIndex
impl Clone for DiversityIndex
Source§fn clone(&self) -> DiversityIndex
fn clone(&self) -> DiversityIndex
Returns a duplicate of the value. Read more
1.0.0 · 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 DiversityIndex
impl Debug for DiversityIndex
Source§impl Display for DiversityIndex
impl Display for DiversityIndex
Source§impl PartialEq for DiversityIndex
impl PartialEq for DiversityIndex
Source§impl PartialOrd for DiversityIndex
impl PartialOrd for DiversityIndex
impl StructuralPartialEq for DiversityIndex
Auto Trait Implementations§
impl Freeze for DiversityIndex
impl RefUnwindSafe for DiversityIndex
impl Send for DiversityIndex
impl Sync for DiversityIndex
impl Unpin for DiversityIndex
impl UnsafeUnpin for DiversityIndex
impl UnwindSafe for DiversityIndex
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