pub struct StringId<I = u16>(/* private fields */);Expand description
Identifier for one string in a crate::StringTable.
I is the backing integer type (default u16) and must implement
crate::StringIndex. It limits how many strings a single table can hold,
and it is what you store in your own structs to later refer to a string.
Implementations§
Source§impl<I: StringIndex> StringId<I>
impl<I: StringIndex> StringId<I>
Sourcepub fn into_usize(self) -> usize
pub fn into_usize(self) -> usize
Returns the value as usize.
Trait Implementations§
Source§impl<I: Ord> Ord for StringId<I>
impl<I: Ord> Ord for StringId<I>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<I: PartialOrd> PartialOrd for StringId<I>
impl<I: PartialOrd> PartialOrd for StringId<I>
impl<I: Copy> Copy for StringId<I>
impl<I: Eq> Eq for StringId<I>
impl<I> StructuralPartialEq for StringId<I>
Auto Trait Implementations§
impl<I> Freeze for StringId<I>where
I: Freeze,
impl<I> RefUnwindSafe for StringId<I>where
I: RefUnwindSafe,
impl<I> Send for StringId<I>where
I: Send,
impl<I> Sync for StringId<I>where
I: Sync,
impl<I> Unpin for StringId<I>where
I: Unpin,
impl<I> UnsafeUnpin for StringId<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for StringId<I>where
I: UnwindSafe,
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