#[repr(transparent)]pub struct DemeSize(_);Expand description
The size of a Deme at a given Time.
This is a newtype wrapper for f64.
Notes
- The size may take on non-integer values.
Examples
In a YAML record
let yaml = "
time_units: years
generation_time: 25
description:
A deme of 50 individuals that grew to 100 individuals
in the last 100 years.
demes:
- name: deme
epochs:
- start_size: 50
end_time: 100
- start_size: 50
end_size: 100
";
demes::loads(yaml).unwrap();Using rust code
Normally, one only needs to create a DemeSize when
working with GraphBuilder.
let t = demes::DemeSize::from(50.0);
assert_eq!(t, 50.0);Trait Implementations§
source§impl<'de> Deserialize<'de> for DemeSize
impl<'de> Deserialize<'de> for DemeSize
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for DemeSize
impl Ord for DemeSize
source§impl PartialEq<DemeSize> for DemeSize
impl PartialEq<DemeSize> for DemeSize
source§impl PartialEq<DemeSize> for f64
impl PartialEq<DemeSize> for f64
source§impl PartialOrd<DemeSize> for DemeSize
impl PartialOrd<DemeSize> for DemeSize
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl PartialOrd<DemeSize> for f64
impl PartialOrd<DemeSize> for f64
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl PartialOrd<f64> for DemeSize
impl PartialOrd<f64> for DemeSize
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for DemeSize
impl Eq for DemeSize
Auto Trait Implementations§
impl RefUnwindSafe for DemeSize
impl Send for DemeSize
impl Sync for DemeSize
impl Unpin for DemeSize
impl UnwindSafe for DemeSize
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.