[−][src]Trait abi_stable::pointer_trait::CanTransmuteElement
Whether the pointer can be transmuted to have T
as the referent type.
Safety for implementor
Implementors of this trait must ensure that:
-
The memory layout of this type is the same regardless of the type of the referent .
-
The pointer type is either
!Drop
(no drop glue either), or it uses a vtable to Drop the referent and deallocate the memory correctly.
Associated Types
type TransmutedPtr: Deref<Target = T>
[src]
The type of the pointer after it's element type has been changed.
Implementations on Foreign Types
impl<'a, T: 'a, O: 'a> CanTransmuteElement<O> for &'a T
[src]
type TransmutedPtr = &'a O
impl<'a, T: 'a, O: 'a> CanTransmuteElement<O> for &'a mut T
[src]
type TransmutedPtr = &'a mut O
Implementors
impl<'a, T, U> CanTransmuteElement<U> for RMut<'a, T> where
U: 'a,
[src]
U: 'a,
type TransmutedPtr = RMut<'a, U>
impl<'a, T, U> CanTransmuteElement<U> for RRef<'a, T> where
U: 'a,
[src]
U: 'a,