Enum rustc_mir::shim::Adjustment [−][src]
enum Adjustment {
Identity,
Deref,
RefMut,
}Variants
Expand description
Pass the receiver as-is.
Expand description
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).
Expand description
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
impl Clone for Adjustment[src]
impl Clone for Adjustment[src]fn clone(&self) -> Adjustment[src]
fn clone(&self) -> Adjustment[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for Adjustment[src]
impl Debug for Adjustment[src]impl PartialEq<Adjustment> for Adjustment[src]
impl PartialEq<Adjustment> for Adjustment[src]impl Copy for Adjustment[src]
impl StructuralPartialEq for Adjustment[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]