pub struct SizeType(/* private fields */);
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<MigrationId> for SizeType
impl PartialEq<MigrationId> for SizeType
Source§impl PartialEq<MutationId> for SizeType
impl PartialEq<MutationId> for SizeType
Source§impl PartialEq<PopulationId> for SizeType
impl PartialEq<PopulationId> for SizeType
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 PopulationId
impl PartialEq<SizeType> for PopulationId
Source§impl PartialEq<SizeType> for tsk_size_t
impl PartialEq<SizeType> for tsk_size_t
Source§impl PartialOrd<EdgeId> for SizeType
impl PartialOrd<EdgeId> for SizeType
Source§impl PartialOrd<MigrationId> for SizeType
impl PartialOrd<MigrationId> for SizeType
Source§impl PartialOrd<MutationId> for SizeType
impl PartialOrd<MutationId> for SizeType
Source§impl PartialOrd<NodeId> for SizeType
impl PartialOrd<NodeId> for SizeType
Source§impl PartialOrd<PopulationId> for SizeType
impl PartialOrd<PopulationId> for SizeType
Source§impl PartialOrd<SiteId> for SizeType
impl PartialOrd<SiteId> for SizeType
Source§impl PartialOrd<SizeType> for EdgeId
impl PartialOrd<SizeType> for EdgeId
Source§impl PartialOrd<SizeType> for MigrationId
impl PartialOrd<SizeType> for MigrationId
Source§impl PartialOrd<SizeType> for MutationId
impl PartialOrd<SizeType> for MutationId
Source§impl PartialOrd<SizeType> for NodeId
impl PartialOrd<SizeType> for NodeId
Source§impl PartialOrd<SizeType> for PopulationId
impl PartialOrd<SizeType> for PopulationId
Source§impl PartialOrd<SizeType> for SiteId
impl PartialOrd<SizeType> for SiteId
Source§impl PartialOrd<SizeType> for tsk_size_t
impl PartialOrd<SizeType> for tsk_size_t
Source§impl PartialOrd<u64> for SizeType
impl PartialOrd<u64> for SizeType
Source§impl PartialOrd for SizeType
impl PartialOrd for SizeType
Source§impl TryFrom<IndividualId> for SizeType
impl TryFrom<IndividualId> for SizeType
Source§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
Source§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
Source§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
Source§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
Source§type Error = TskitError
type Error = TskitError
The type returned in the event of a conversion error.
impl Copy for SizeType
impl Eq for SizeType
impl StructuralPartialEq for SizeType
Auto Trait Implementations§
impl Freeze for SizeType
impl RefUnwindSafe for SizeType
impl Send for SizeType
impl Sync for SizeType
impl Unpin for SizeType
impl UnwindSafe for SizeType
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