Trait munge::Destructure
source · [−]pub unsafe trait Destructure {
type Underlying: ?Sized;
type Test;
fn as_mut_ptr(&mut self) -> *mut Self::Underlying;
unsafe fn test(&mut self) -> Self::Test { ... }
}Expand description
A type that can be destructured into its constituent parts.
Safety
Destructuring this type with a given pattern must be safe if and only if destructuring Test
with the same pattern is also safe.
Required Associated Types
type Underlying: ?Sized
type Underlying: ?Sized
The underlying type that is destructured.
Required Methods
fn as_mut_ptr(&mut self) -> *mut Self::Underlying
fn as_mut_ptr(&mut self) -> *mut Self::Underlying
Returns a mutable pointer to the underlying type.