[][src]Struct structural::field::ownership::RunPostDrop

pub struct RunPostDrop<'a, T> where
    T: PrePostDropFields
{ /* fields omitted */ }

A guard that calls PrePostDropFields::post_drop on the mutable reference when it is dropped.

Implementations

impl<'a, T> RunPostDrop<'a, T> where
    T: PrePostDropFields
[src]

pub unsafe fn new(mutref: &'a mut T) -> Self[src]

Constructs this RunPostDrop.

Safety

This has the same safety requirements as PrePostDropFields::post_drop.

Drop order

Remember that variables on the stack are dropped in the opposite order than they are declared.

In this example:

This example is not tested
let a=Foo;
let b=Bar;
let c=Baz;

c gets dropped first,then b, then a.

pub unsafe fn get_mut(&mut self) -> &mut T[src]

Reborrows the wrapped mutable reference.

Safety

The returned references must not be mutated, only passed to accessor trait (declared in structural) methods for moving out fields .

Trait Implementations

impl<'a, T> Drop for RunPostDrop<'a, T> where
    T: PrePostDropFields
[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for RunPostDrop<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for RunPostDrop<'a, T> where
    T: Send

impl<'a, T> Sync for RunPostDrop<'a, T> where
    T: Sync

impl<'a, T> Unpin for RunPostDrop<'a, T>

impl<'a, T> !UnwindSafe for RunPostDrop<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<This, T> Array0<T> for This where
    This: ?Sized
[src]

impl<This, V, T> Array0Variant<T, V> for This where
    This: ?Sized
[src]

impl<This, T> ArrayMove0<T> for This where
    This: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<This, T> IntoStructural<T> for This where
    T: FromStructural<This>, 
[src]

impl<T> SelfOps for T where
    T: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The error type returned when the conversion fails.

impl<This, T> TryIntoStructural<T> for This where
    T: TryFromStructural<This>, 
[src]

type Error = <T as TryFromStructural<This>>::Error

The error parameter of TryFromError, returned from try_into_structural on conversion error. Read more

impl<T> TypeIdentity for T where
    T: ?Sized
[src]

type Type = T

The same type as Self. Read more