Trait rattish::container::InnermostTypeId [−][src]
pub unsafe trait InnermostTypeId {
fn innermost_type_id(&self) -> Result<TypeId, TypeIdDeterminationError>;
}
Expand description
A dereferenceable type that inherits
Pointee::Metadata
from a contained type,
pointers to which are therefore coercible if that contained type is
coercible.
Safety
The safety of unsafe code in rattish depends upon this trait being correctly implemented.
Required methods
fn innermost_type_id(&self) -> Result<TypeId, TypeIdDeterminationError>
fn innermost_type_id(&self) -> Result<TypeId, TypeIdDeterminationError>
Returns the TypeId
of the concrete value underlying
<Self as ptr::Pointee>::Metadata
.
Unless Self
is a leaf, such as a dyn Trait
(in which case this
should delegate to a trait method like
Any::type_id
), this should just delegate to
the contained type’s innermost_type_id
.
Implementations on Foreign Types
impl<'a, T> InnermostTypeId for Box<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature alloc
only.
impl<'a, T> InnermostTypeId for Box<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature
alloc
only.impl<'a, T> InnermostTypeId for Rc<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature alloc
only.
impl<'a, T> InnermostTypeId for Rc<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature
alloc
only.impl<'a, T> InnermostTypeId for Weak<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature alloc
only.
impl<'a, T> InnermostTypeId for Weak<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature
alloc
only.impl<'a, T> InnermostTypeId for Arc<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature alloc
only.
impl<'a, T> InnermostTypeId for Arc<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature
alloc
only.impl<'a, T> InnermostTypeId for Weak<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature alloc
only.
impl<'a, T> InnermostTypeId for Weak<T> where
T: ?Sized + InnermostTypeId,
This is supported on crate feature
alloc
only.