pub struct Unique<I: Id> { /* private fields */ }Expand description
Implementations§
Source§impl<I> Unique<I>where
<I as ConstFnBounds>::Type: Id,
impl<I> Unique<I>where
<I as ConstFnBounds>::Type: Id,
Sourcepub const unsafe fn new(id: I) -> Self
pub const unsafe fn new(id: I) -> Self
Create a new Unique, asserting that the given ID contained within is unique.
§Safety
The given id must be unique at the time of calling this function.
Sourcepub const fn into_inner(self) -> I
pub const fn into_inner(self) -> I
Take the inner ID out of this Unique, taking away the uniqueness guarantee.
Trait Implementations§
impl<I: Eq + Id> Eq for Unique<I>
impl<I: Id> StructuralPartialEq for Unique<I>
impl<I: Id> Sync for Unique<I>
Auto Trait Implementations§
impl<I> Freeze for Unique<I>where
I: Freeze,
impl<I> RefUnwindSafe for Unique<I>where
I: RefUnwindSafe,
impl<I> Send for Unique<I>where
I: Send,
impl<I> Unpin for Unique<I>where
I: Unpin,
impl<I> UnsafeUnpin for Unique<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for Unique<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