pub struct ProtoContext<Eff, Event> { /* private fields */ }
Expand description
Initial version of capability Context which has not yet been specialized to a chosen capability
Implementations§
source§impl<Eff, Ev> ProtoContext<Eff, Ev>where
Ev: 'static,
Eff: 'static,
impl<Eff, Ev> ProtoContext<Eff, Ev>where
Ev: 'static,
Eff: 'static,
sourcepub fn specialize<Op, F>(&self, func: F) -> CapabilityContext<Op, Ev>
pub fn specialize<Op, F>(&self, func: F) -> CapabilityContext<Op, Ev>
Specialize the CapabilityContext to a specific capability, wrapping its operations into
an Effect Ef
. The func
argument will typically be an Effect variant constructor, but
can be any function taking the capability’s operation type and returning
the effect type.
This will likely only be called from the implementation of WithContext
for the app’s Capabilities
type. You should not need to call this function directly.
Auto Trait Implementations§
impl<Eff, Event> Freeze for ProtoContext<Eff, Event>
impl<Eff, Event> !RefUnwindSafe for ProtoContext<Eff, Event>
impl<Eff, Event> Send for ProtoContext<Eff, Event>
impl<Eff, Event> Sync for ProtoContext<Eff, Event>
impl<Eff, Event> Unpin for ProtoContext<Eff, Event>
impl<Eff, Event> !UnwindSafe for ProtoContext<Eff, Event>
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