pub struct Request<Op>where
Op: Operation,{
pub operation: Op,
/* private fields */
}
Expand description
Request represents an effect request from the core to the shell.
The operation
is the input needed to process the effect, and will be one
of the capabilities’ Operation
types.
The request can be resolved by passing it to Core::resolve
along with the
corresponding result of type Operation::Output
.
Fields§
§operation: Op
Implementations§
source§impl<Op> Request<Op>where
Op: Operation,
impl<Op> Request<Op>where
Op: Operation,
sourcepub fn serialize<F, Eff>(self, effect: F) -> (Eff, ResolveSerialized)where
F: FnOnce(Op) -> Eff,
pub fn serialize<F, Eff>(self, effect: F) -> (Eff, ResolveSerialized)where
F: FnOnce(Op) -> Eff,
Serialize this effect request using effect
as a constructor
for a serializable Effect Eff
You should never need to call this method yourself, it will be called
by the generated implementation of Effect::serialize
,
which is used by the Bridge implementation.
Trait Implementations§
Auto Trait Implementations§
impl<Op> Freeze for Request<Op>where
Op: Freeze,
impl<Op> !RefUnwindSafe for Request<Op>
impl<Op> Send for Request<Op>
impl<Op> !Sync for Request<Op>
impl<Op> Unpin for Request<Op>where
Op: Unpin,
impl<Op> !UnwindSafe for Request<Op>
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