#[repr(transparent)]
pub struct IdU16<T> { /* fields omitted */ }
Expand description
A struct representing IDs usable for various purposes using an 16
bit wide unsigned integer.
Please see the Id
type for more general information and usage
examples.
Create a new ID using the given value.
This constructor panics if an overflow of the underlying
counter occurred.
id
must not be zero
id
should be unique with respect to other IDs created for this
T
to preserve the invariant that IDs are unique
Create a new unique ID.
This constructor panics if an overflow of the underlying
counter occurred.
Retrieve the underlying integer value.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Format the ID with the given formatter.
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.