pub enum DerivedCtx<'a, C> {
Borrowed(&'a C),
Owned(C),
}Expand description
A derived-context value that may either borrow from the AchievementContext
for the duration of an evaluation or own its data.
This type lets derive_ctx return either a borrowed reference tied to the
ctx lifetime (zero-copy) or an owned C (cloned/constructed on demand).
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<'a, C> Freeze for DerivedCtx<'a, C>where
C: Freeze,
impl<'a, C> RefUnwindSafe for DerivedCtx<'a, C>where
C: RefUnwindSafe,
impl<'a, C> Send for DerivedCtx<'a, C>
impl<'a, C> Sync for DerivedCtx<'a, C>where
C: Sync,
impl<'a, C> Unpin for DerivedCtx<'a, C>where
C: Unpin,
impl<'a, C> UnwindSafe for DerivedCtx<'a, C>where
C: UnwindSafe + RefUnwindSafe,
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