pub enum DefInstance<T: Instantiate> {
Def(T),
Ref(Instance<T>),
}
Expand description
Either an instance of a T
, or a directly inlined T
object.
Variants§
Trait Implementations§
Source§impl<T: Instantiate> From<Instance<T>> for DefInstance<T>
impl<T: Instantiate> From<Instance<T>> for DefInstance<T>
Auto Trait Implementations§
impl<T> Freeze for DefInstance<T>
impl<T> RefUnwindSafe for DefInstance<T>where
T: RefUnwindSafe,
<T as Instantiate>::Data: RefUnwindSafe,
impl<T> Send for DefInstance<T>
impl<T> Sync for DefInstance<T>
impl<T> Unpin for DefInstance<T>
impl<T> UnwindSafe for DefInstance<T>where
T: UnwindSafe,
<T as Instantiate>::Data: 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