pub enum Adaptation {
Identity,
Delegated {
converts: bool,
},
Interface(Box<InterfaceConversion>),
ImplicitSome {
payload: Box<Adaptation>,
},
Newtype,
Tuple(Vec<Adaptation>),
Array(Box<Adaptation>),
Receiver(ReceiverCoercion),
}Expand description
How a value of its source type becomes a value of its slot type.
Variants§
Identity
Delegated
The children that produce the value adapt it to the slot type.
Interface(Box<InterfaceConversion>)
ImplicitSome
A Go interface value where an Option is expected.
Fields
§
payload: Box<Adaptation>Newtype
Tuple(Vec<Adaptation>)
Array(Box<Adaptation>)
Receiver(ReceiverCoercion)
A method receiver that takes its address or reads through its reference.
Implementations§
Trait Implementations§
Source§impl Clone for Adaptation
impl Clone for Adaptation
Auto Trait Implementations§
impl Forget for Adaptation
impl Freeze for Adaptationwhere
*const InterfaceConversion is !null: Freeze,
PhantomData<InterfaceConversion>: Freeze,
*const Adaptation is !null: Freeze,
PhantomData<Adaptation>: Freeze,
*const u8 is !null: Freeze,
impl Move for Adaptation
impl RefUnwindSafe for Adaptation
impl Send for Adaptation
impl Sync for Adaptation
impl Unpin for Adaptation
impl UnsafeUnpin for Adaptationwhere
*const InterfaceConversion is !null: UnsafeUnpin,
PhantomData<InterfaceConversion>: UnsafeUnpin,
*const Adaptation is !null: UnsafeUnpin,
PhantomData<Adaptation>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
impl UnwindSafe for Adaptationwhere
BoxRaw<InterfaceConversion>: UnwindSafe,
BoxRaw<Adaptation>: UnwindSafe,
RawVecInner: UnwindSafe,
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