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.