#[repr(transparent)]pub struct Label<Tag: WithLt<L>, L: LifetimeList = L0>(pub <Tag as WithLt<L>>::Reified);Expand description
Wrapper that reports as being tagged by a specific tag.
Not all types implement Tagged. This wrapper can be used in those cases
to have a type that with reify to itself after using it’s tag.
Tuple Fields§
§0: <Tag as WithLt<L>>::ReifiedImplementations§
Source§impl<L: LifetimeList, Tag: WithLt<L>> Label<Tag, L>
impl<L: LifetimeList, Tag: WithLt<L>> Label<Tag, L>
Source§impl<L: LifetimeList, Tag: WithLt<L>> Label<Tag, L>
impl<L: LifetimeList, Tag: WithLt<L>> Label<Tag, L>
pub const fn from_ref(value: &<Tag as WithLt<L>>::Reified) -> &Self
Available on crate feature
unsafe only.pub const fn from_mut(value: &mut <Tag as WithLt<L>>::Reified) -> &mut Self
Available on crate feature
unsafe only.pub const fn to_ref(&self) -> &<Tag as WithLt<L>>::Reified
Available on crate feature
unsafe only.pub const fn to_mut(&mut self) -> &mut <Tag as WithLt<L>>::Reified
Available on crate feature
unsafe only.Trait Implementations§
Auto Trait Implementations§
impl<Tag, L> Freeze for Label<Tag, L>
impl<Tag, L> RefUnwindSafe for Label<Tag, L>
impl<Tag, L> Send for Label<Tag, L>
impl<Tag, L> Sync for Label<Tag, L>
impl<Tag, L> Unpin for Label<Tag, L>
impl<Tag, L> UnwindSafe for Label<Tag, L>
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