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)]
Trait Implementations
sourceimpl From<SizeType> for tsk_size_t
impl From<SizeType> for tsk_size_t
sourceimpl From<u64> for SizeType
impl From<u64> for SizeType
sourcefn from(value: tsk_size_t) -> Self
fn from(value: tsk_size_t) -> Self
Converts to this type from the input type.
sourceimpl Ord for SizeType
impl Ord for SizeType
sourceimpl PartialEq<MigrationId> for SizeType
impl PartialEq<MigrationId> for SizeType
sourceimpl PartialEq<MutationId> for SizeType
impl PartialEq<MutationId> for SizeType
sourceimpl PartialEq<PopulationId> for SizeType
impl PartialEq<PopulationId> for SizeType
sourceimpl PartialEq<SizeType> for MutationId
impl PartialEq<SizeType> for MutationId
sourceimpl PartialEq<SizeType> for PopulationId
impl PartialEq<SizeType> for PopulationId
sourceimpl PartialEq<SizeType> for MigrationId
impl PartialEq<SizeType> for MigrationId
sourceimpl PartialEq<SizeType> for tsk_size_t
impl PartialEq<SizeType> for tsk_size_t
sourceimpl PartialOrd<EdgeId> for SizeType
impl PartialOrd<EdgeId> for SizeType
sourcefn partial_cmp(&self, other: &EdgeId) -> Option<Ordering>
fn partial_cmp(&self, other: &EdgeId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<MigrationId> for SizeType
impl PartialOrd<MigrationId> for SizeType
sourcefn partial_cmp(&self, other: &MigrationId) -> Option<Ordering>
fn partial_cmp(&self, other: &MigrationId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<MutationId> for SizeType
impl PartialOrd<MutationId> for SizeType
sourcefn partial_cmp(&self, other: &MutationId) -> Option<Ordering>
fn partial_cmp(&self, other: &MutationId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<NodeId> for SizeType
impl PartialOrd<NodeId> for SizeType
sourcefn partial_cmp(&self, other: &NodeId) -> Option<Ordering>
fn partial_cmp(&self, other: &NodeId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<PopulationId> for SizeType
impl PartialOrd<PopulationId> for SizeType
sourcefn partial_cmp(&self, other: &PopulationId) -> Option<Ordering>
fn partial_cmp(&self, other: &PopulationId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SiteId> for SizeType
impl PartialOrd<SiteId> for SizeType
sourcefn partial_cmp(&self, other: &SiteId) -> Option<Ordering>
fn partial_cmp(&self, other: &SiteId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SizeType> for NodeId
impl PartialOrd<SizeType> for NodeId
sourcefn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
fn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SizeType> for EdgeId
impl PartialOrd<SizeType> for EdgeId
sourcefn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
fn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SizeType> for SiteId
impl PartialOrd<SizeType> for SiteId
sourcefn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
fn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SizeType> for MutationId
impl PartialOrd<SizeType> for MutationId
sourcefn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
fn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SizeType> for PopulationId
impl PartialOrd<SizeType> for PopulationId
sourcefn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
fn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SizeType> for MigrationId
impl PartialOrd<SizeType> for MigrationId
sourcefn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
fn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SizeType> for SizeType
impl PartialOrd<SizeType> for SizeType
sourcefn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
fn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SizeType> for tsk_size_t
impl PartialOrd<SizeType> for tsk_size_t
sourcefn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
fn partial_cmp(&self, other: &SizeType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<u64> for SizeType
impl PartialOrd<u64> for SizeType
sourcefn partial_cmp(&self, other: &tsk_size_t) -> Option<Ordering>
fn partial_cmp(&self, other: &tsk_size_t) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl 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.
sourcefn try_from(value: IndividualId) -> Result<Self, Self::Error>
fn try_from(value: IndividualId) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl 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.
sourcefn try_from(value: MigrationId) -> Result<Self, Self::Error>
fn try_from(value: MigrationId) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl 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.
sourcefn try_from(value: MutationId) -> Result<Self, Self::Error>
fn try_from(value: MutationId) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl 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.
sourcefn try_from(value: PopulationId) -> Result<Self, Self::Error>
fn try_from(value: PopulationId) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl 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.
sourcefn try_from(value: ProvenanceId) -> Result<Self, Self::Error>
fn try_from(value: ProvenanceId) -> Result<Self, Self::Error>
Performs the conversion.
impl Copy for SizeType
impl Eq for SizeType
impl StructuralEq for SizeType
impl StructuralPartialEq for SizeType
Auto Trait Implementations
impl RefUnwindSafe for SizeType
impl Send for SizeType
impl Sync for SizeType
impl Unpin for SizeType
impl UnwindSafe for SizeType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more