pub struct SizeType(_);
Expand description
Wraps tsk_size_t
This type plays the role of C’s size_t
in the tskit
C library.
Examples
let s = tskit::SizeType::from(1 as tskit::bindings::tsk_size_t);
let mut t: tskit::bindings::tsk_size_t = s.into();
assert!(t == s);
assert!(t == 1);
let u = tskit::SizeType::from(s);
assert!(u == s);
t += 1;
assert!(t > s);
assert!(s < t);
#[repr(transparent)]
Implementations§
Trait Implementations§
source§impl From<SizeType> for tsk_size_t
impl From<SizeType> for tsk_size_t
source§impl From<u64> for SizeType
impl From<u64> for SizeType
source§fn from(value: tsk_size_t) -> Self
fn from(value: tsk_size_t) -> Self
Converts to this type from the input type.
source§impl Ord for SizeType
impl Ord for SizeType
source§impl PartialEq<EdgeId> for SizeType
impl PartialEq<EdgeId> for SizeType
source§impl PartialEq<MigrationId> for SizeType
impl PartialEq<MigrationId> for SizeType
source§fn eq(&self, other: &MigrationId) -> bool
fn eq(&self, other: &MigrationId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<MutationId> for SizeType
impl PartialEq<MutationId> for SizeType
source§fn eq(&self, other: &MutationId) -> bool
fn eq(&self, other: &MutationId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NodeId> for SizeType
impl PartialEq<NodeId> for SizeType
source§impl PartialEq<PopulationId> for SizeType
impl PartialEq<PopulationId> for SizeType
source§fn eq(&self, other: &PopulationId) -> bool
fn eq(&self, other: &PopulationId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<SiteId> for SizeType
impl PartialEq<SiteId> for SizeType
source§impl PartialEq<SizeType> for EdgeId
impl PartialEq<SizeType> for EdgeId
source§impl PartialEq<SizeType> for MigrationId
impl PartialEq<SizeType> for MigrationId
source§impl PartialEq<SizeType> for MutationId
impl PartialEq<SizeType> for MutationId
source§impl PartialEq<SizeType> for NodeId
impl PartialEq<SizeType> for NodeId
source§impl PartialEq<SizeType> for PopulationId
impl PartialEq<SizeType> for PopulationId
source§impl PartialEq<SizeType> for SiteId
impl PartialEq<SizeType> for SiteId
source§impl PartialEq<SizeType> for SizeType
impl PartialEq<SizeType> for SizeType
source§impl PartialEq<SizeType> for tsk_size_t
impl PartialEq<SizeType> for tsk_size_t
source§impl PartialEq<u64> for SizeType
impl PartialEq<u64> for SizeType
source§fn eq(&self, other: &tsk_size_t) -> bool
fn eq(&self, other: &tsk_size_t) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<EdgeId> for SizeType
impl PartialOrd<EdgeId> for SizeType
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<MigrationId> for SizeType
impl PartialOrd<MigrationId> for SizeType
source§fn partial_cmp(&self, other: &MigrationId) -> Option<Ordering>
fn partial_cmp(&self, other: &MigrationId) -> Option<Ordering>
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<MutationId> for SizeType
impl PartialOrd<MutationId> for SizeType
source§fn partial_cmp(&self, other: &MutationId) -> Option<Ordering>
fn partial_cmp(&self, other: &MutationId) -> Option<Ordering>
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<NodeId> for SizeType
impl PartialOrd<NodeId> for SizeType
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<PopulationId> for SizeType
impl PartialOrd<PopulationId> for SizeType
source§fn partial_cmp(&self, other: &PopulationId) -> Option<Ordering>
fn partial_cmp(&self, other: &PopulationId) -> Option<Ordering>
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<SiteId> for SizeType
impl PartialOrd<SiteId> for SizeType
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<SizeType> for EdgeId
impl PartialOrd<SizeType> for EdgeId
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<SizeType> for MigrationId
impl PartialOrd<SizeType> for MigrationId
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<SizeType> for MutationId
impl PartialOrd<SizeType> for MutationId
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<SizeType> for NodeId
impl PartialOrd<SizeType> for NodeId
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<SizeType> for PopulationId
impl PartialOrd<SizeType> for PopulationId
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<SizeType> for SiteId
impl PartialOrd<SizeType> for SiteId
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<SizeType> for SizeType
impl PartialOrd<SizeType> for SizeType
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<SizeType> for tsk_size_t
impl PartialOrd<SizeType> for tsk_size_t
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<u64> for SizeType
impl PartialOrd<u64> for SizeType
source§fn partial_cmp(&self, other: &tsk_size_t) -> Option<Ordering>
fn partial_cmp(&self, other: &tsk_size_t) -> Option<Ordering>
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 TryFrom<IndividualId> for SizeType
impl TryFrom<IndividualId> for SizeType
§type Error = TskitError
type Error = TskitError
The type returned in the event of a conversion error.
source§impl TryFrom<MigrationId> for SizeType
impl TryFrom<MigrationId> for SizeType
§type Error = TskitError
type Error = TskitError
The type returned in the event of a conversion error.
source§impl TryFrom<MutationId> for SizeType
impl TryFrom<MutationId> for SizeType
§type Error = TskitError
type Error = TskitError
The type returned in the event of a conversion error.
source§impl TryFrom<PopulationId> for SizeType
impl TryFrom<PopulationId> for SizeType
§type Error = TskitError
type Error = TskitError
The type returned in the event of a conversion error.
source§impl TryFrom<ProvenanceId> for SizeType
impl TryFrom<ProvenanceId> for SizeType
§type Error = TskitError
type Error = TskitError
The type returned in the event of a conversion error.