pub struct WrapTarget {
pub path: SmallVec<[u8; 4]>,
pub wrap_as_trait_id: u32,
}Expand description
One auto-boxing site inside an Erase_T-rewritten return type.
path walks the generic-argument tree from the outer return type:
Selfin return position →path = [](the whole return)Result<Self, Error>→path = [0](the Ok arm)(Self, Self)(tuple) → two entries,path = [0]andpath = [1]HashMap<int, Self>→path = [1](the value type)Option<Result<Self, Error>>→path = [0, 0](the inner Ok arm)
wrap_as_trait_id is the trait the boxed value should advertise
itself under — usually the receiver trait’s id, but for Self::A
(associated-type return with bound Bound) the bound’s trait id
per §Q25.C.1 row 4.
Fields§
§path: SmallVec<[u8; 4]>Argument-index path into the structural return type.
wrap_as_trait_id: u32Trait the wrapped value’s vtable should be registered against.
Trait Implementations§
Source§impl Clone for WrapTarget
impl Clone for WrapTarget
Source§fn clone(&self) -> WrapTarget
fn clone(&self) -> WrapTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WrapTarget
impl RefUnwindSafe for WrapTarget
impl Send for WrapTarget
impl Sync for WrapTarget
impl Unpin for WrapTarget
impl UnsafeUnpin for WrapTarget
impl UnwindSafe for WrapTarget
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