Enum rustc_mir_transform::shim::Adjustment
source · enum Adjustment {
Identity,
Deref,
RefMut,
}
Variants§
Identity
Pass the receiver as-is.
Deref
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
).
RefMut
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§
source§impl Clone for Adjustment
impl Clone for Adjustment
source§fn clone(&self) -> Adjustment
fn clone(&self) -> Adjustment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Adjustment
impl Debug for Adjustment
source§impl PartialEq<Adjustment> for Adjustment
impl PartialEq<Adjustment> for Adjustment
source§fn eq(&self, other: &Adjustment) -> bool
fn eq(&self, other: &Adjustment) -> bool
impl Copy for Adjustment
impl StructuralPartialEq for Adjustment
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§
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