Skip to main content

Projection

Trait Projection 

Source
pub trait Projection {
    type Source: ?Sized;
    type Target: ?Sized;

    // Required methods
    fn offset(&self, meta: <Self::Source as Pointee>::Metadata) -> usize;
    fn project_metadata(
        &self,
        meta: <Self::Source as Pointee>::Metadata,
    ) -> <Self::Target as Pointee>::Metadata;
}

Required Associated Types§

Required Methods§

Source

fn offset(&self, meta: <Self::Source as Pointee>::Metadata) -> usize

Source

fn project_metadata( &self, meta: <Self::Source as Pointee>::Metadata, ) -> <Self::Target as Pointee>::Metadata

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<P, Q> Projection for ComposeProj<P, Q>
where P: Projection + ?Sized, Q: Projection<Source = P::Target>,

Source§

impl<S, T> Projection for SizedProj<S, T>

Source§

impl<T: ?Sized> Projection for NoopProj<T>