pub struct IvarDrop<T> { /* private fields */ }
Expand description

A helper type to allow putting certain types that may drop into ivars.

This is used to work around current limitations in the type system. Consider this type “temporary” in the sense that one day it may just become type IvarDrop<T> = T.

This currently works with the following types:

  • Box<T>
  • Option<Box<T>>
  • Id<T, O>
  • Option<Id<T, O>>

Further may be added when the standard library guarantees their layout.

See examples/delegate.rs for usage.

Trait Implementations

The type that an Ivar containing this will dereference to. Read more

The type that an Ivar containing this will dereference to. Read more

The type that an Ivar containing this will dereference to. Read more

The type that an Ivar containing this will dereference to. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.