Struct Tagged

pub(in ::error) struct Tagged<E: ?Sized> { pub(in ::error) tag_id: TypeId, pub(in ::error) value: E }

Fields

tag_id: TypeId
value: E

Implementations

impl<'a> Tagged<dyn Erased<'a> + 'a>

fn downcast<I>(&self) -> Option<&TaggedOption<'a, I>>
where
    I: Type<'a>,

Returns some reference to the dynamic value if it is tagged with I, or None otherwise.

fn downcast_mut<I>(&mut self) -> Option<&mut TaggedOption<'a, I>>
where
    I: Type<'a>,

Returns some mutable reference to the dynamic value if it is tagged with I, or None otherwise.

impl<'a, I: Type<'a>> Tagged<TaggedOption<'a, I>>

fn as_request(&mut self) -> &mut Request<'a>

Auto Trait Implementations

impl<E> Freeze for Tagged<E> where E: Freeze + ?Sized,

impl<E> RefUnwindSafe for Tagged<E> where E: RefUnwindSafe + ?Sized,

impl<E> Send for Tagged<E> where E: Send + ?Sized,

impl<E> Sync for Tagged<E> where E: Sync + ?Sized,

impl<E> Unpin for Tagged<E> where E: Unpin + ?Sized,

impl<E> UnsafeUnpin for Tagged<E> where E: UnsafeUnpin + ?Sized,

impl<E> UnwindSafe for Tagged<E> where E: UnwindSafe + ?Sized,

Blanket Implementations

impl<T> Any for Tagged<E> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Tagged<E> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Tagged<E> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Tagged<E>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Tagged<E> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Tagged<E>

impl<T, U> Into<U> for Tagged<E> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Tagged<E> where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for Tagged<E> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>