Enum rustc_mir_transform::shim::Adjustment [−][src]
enum Adjustment {
Identity,
Deref,
RefMut,
}
Variants
Pass the receiver as-is.
We get passed &[mut] self
and call the target with *self
.
This either copies self
(if Self: Copy
, eg. for function items), or moves out of it
(for VtableShim
, which effectively is passed &own Self
).
We get passed self: Self
and call the target with &mut self
.
In this case we need to ensure that the Self
is dropped after the call, as the callee
won’t do it for us.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Adjustment
impl Send for Adjustment
impl Sync for Adjustment
impl Unpin for Adjustment
impl UnwindSafe for Adjustment
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Identity
: 0 bytesDeref
: 0 bytesRefMut
: 0 bytes