Struct sid::Id [−][src]
#[repr(C)]pub struct Id<Tag, Handle = u32> { pub handle: Handle, pub _marker: PhantomData<Tag>, }
Fields
handle: Handle
_marker: PhantomData<Tag>
Methods
impl<T, H: IntegerHandle> Id<T, H>[src]
impl<T, H: IntegerHandle> Id<T, H>pub fn new(idx: H) -> Id<T, H>[src]
pub fn new(idx: H) -> Id<T, H>ⓘImportant traits for IdRange<T, H>pub fn as_range(&self) -> IdRange<T, H>[src]
ⓘImportant traits for IdRange<T, H>
pub fn as_range(&self) -> IdRange<T, H>Trait Implementations
impl<T, H: Display> Debug for Id<T, H>[src]
impl<T, H: Display> Debug for Id<T, H>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T, H: Copy> Copy for Id<T, H>[src]
impl<T, H: Copy> Copy for Id<T, H>impl<T, H: Copy> Clone for Id<T, H>[src]
impl<T, H: Copy> Clone for Id<T, H>fn clone(&self) -> Id<T, H>[src]
fn clone(&self) -> Id<T, H>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<T, H: PartialEq> PartialEq for Id<T, H>[src]
impl<T, H: PartialEq> PartialEq for Id<T, H>fn eq(&self, other: &Id<T, H>) -> bool[src]
fn eq(&self, other: &Id<T, H>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> bool1.0.0
[src]This method tests for !=.
impl<T, H: Copy + Eq> Eq for Id<T, H>[src]
impl<T, H: Copy + Eq> Eq for Id<T, H>impl<T, H: IntegerHandle> Identifier for Id<T, H>[src]
impl<T, H: IntegerHandle> Identifier for Id<T, H>impl<T, H: ToUsize> ToUsize for Id<T, H>[src]
impl<T, H: ToUsize> ToUsize for Id<T, H>impl<T, H: IntegerHandle> FromUsize for Id<T, H>[src]
impl<T, H: IntegerHandle> FromUsize for Id<T, H>fn from_usize(idx: usize) -> Id<T, H>[src]
fn from_usize(idx: usize) -> Id<T, H>impl<T, Handle: Hash> Hash for Id<T, Handle>[src]
impl<T, Handle: Hash> Hash for Id<T, Handle>fn hash<H: Hasher>(&self, state: &mut H)[src]
fn hash<H: Hasher>(&self, state: &mut H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
[src]Feeds a slice of this type into the given [Hasher]. Read more
impl<T, Handle: IntegerHandle> Add<Handle> for Id<T, Handle>[src]
impl<T, Handle: IntegerHandle> Add<Handle> for Id<T, Handle>type Output = Self
The resulting type after applying the + operator.
fn add(self, offset: Handle) -> Self[src]
fn add(self, offset: Handle) -> SelfPerforms the + operation.
impl<T, Handle: IntegerHandle> Sub<Handle> for Id<T, Handle>[src]
impl<T, Handle: IntegerHandle> Sub<Handle> for Id<T, Handle>