Skip to main content

PlaceWrap

Trait PlaceWrap 

Source
pub unsafe trait PlaceWrap<P: Projection<Source = Self::Target>>: HasPlace {
    type WrappedProj: Projection<Source = Self>;

    // Required method
    fn wrap_proj(p: &P) -> Self::WrappedProj;
}
Expand description

If X: PlaceWrap and X::Target has a field field, then X itself acquires a virtual field named field as well. That field has type <X as PlaceWrap<proj_ty!(X::Target.field)>>::WrappedProj::Target, and WrappedProj is the projection used when we refer to that field.

Required Associated Types§

Source

type WrappedProj: Projection<Source = Self>

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§