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

The underlying type that is destructured.

The type to test destructuring against for safety.

Required Methods

Returns a mutable pointer to the underlying type.

Provided Methods

Returns the type used to test destructuring.

Safety

It is never safe to call this function.

Implementations on Foreign Types

Implementors