Trait RevMoveOutFieldImpl

Source
pub unsafe trait RevMoveOutFieldImpl<This: ?Sized>: RevIntoFieldImpl<This> + ShallowFieldPath {
    // Required method
    unsafe fn rev_move_out_field(
        self,
        this: &mut This,
        moved: &mut MovedOutFields,
    ) -> Result<Self::Ty, Self::Err>
       where Self::Ty: Sized;
}
Expand description

Like Into*Field::move_out_*field_,except that the parameters are reversed,

This is the type we are accessing,and Self is a field path.

This is used by the implementations of the RevIntoMultiFieldImpl trait.

§Safety

Implementors of this traits must do any of:

  • Delegate their implementations to the IntoField and IntoVariantField traits.

  • Be implemented following the safety requirements of the IntoField (if it’s moving out a struct field) or IntoVariantField (if it’s moving out an enum field).

Required Methods§

Source

unsafe fn rev_move_out_field( self, this: &mut This, moved: &mut MovedOutFields, ) -> Result<Self::Ty, Self::Err>
where Self::Ty: Sized,

Moves out the field that self represents inside of this.

§Safety

The same instance of MovedOutFields must be passed to every call to rev_move_out_field on the same instance of this, as well as not mutating that MovedOutFields instance outside of rev_move_out_field with the same This parameter.

Each field must be moved with any method at most once on the same instance of This.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<This, F0> RevMoveOutFieldImpl<This> for NestedFieldPath<(F0,)>
where This: ?Sized, F0: RevMoveOutFieldImpl<This>,

Source§

impl<This, T> RevMoveOutFieldImpl<This> for TStr<T>
where This: ?Sized + IntoField<Self>,

Source§

impl<This, T, U> RevMoveOutFieldImpl<This> for FieldPathSet<(T,), U>
where This: ?Sized, T: RevMoveOutFieldImpl<This>,

Source§

impl<This, _V, _F> RevMoveOutFieldImpl<This> for VariantField<_V, _F>
where This: ?Sized + IntoVariantField<_V, _F>,