Enum rustc_mir_transform::shim::Adjustment
source · enum Adjustment {
Identity,
Deref {
source: DerefSource,
},
RefMut,
}
Variants§
Identity
Pass the receiver as-is.
Deref
Fields
§
source: DerefSource
We get passed a reference or a raw pointer to 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
This method tests for
self
and other
values to be equal, and is used
by ==
.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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
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
: 1 byteRefMut
: 0 bytes