Skip to main content

Subplace

Trait Subplace 

Source
pub unsafe trait Subplace: Sized {
    type Source: ?Sized;
    type Target: ?Sized;

    // Required method
    fn offset(
        self,
        metadata: Metadata<Self::Source>,
    ) -> (usize, Metadata<Self::Target>);
}
Expand description

Represents a subplace in Self::Source.

A subplace is directly contained in its parent (i.e. there is no pointer indirection).

Required Associated Types§

Required Methods§

Source

fn offset( self, metadata: Metadata<Self::Source>, ) -> (usize, Metadata<Self::Target>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F, Source, Target> Subplace for TransmutedField<F, Source, Target>
where F: Field, Source: ?Sized + Pointee<Metadata = Metadata<F::Source>>, Target: ?Sized + Pointee<Metadata = Metadata<F::Target>>,

Source§

type Source = Source

Source§

type Target = Target

Source§

impl<Sub, Source, Target> Subplace for TransmutedSubplace<Sub, Source, Target>
where Sub: Subplace, Source: ?Sized + Pointee<Metadata = Metadata<Sub::Source>>, Target: ?Sized + Pointee<Metadata = Metadata<Sub::Target>>,

Source§

type Source = Source

Source§

type Target = Target

Source§

impl<T, const LEN: usize> Subplace for ArrayIndex<T, LEN>

Source§

impl<T> Subplace for SliceIndex<T>