pub struct Parked<A, RouteSet, Op>{ /* private fields */ }Expand description
A route for effects handled over a custom, user-owned FFI.
The “opaque typed” lane is for operations whose payloads or results are
awkward or undesirable to serialize, such as pointer-style handles or large
non-serializable buffers. Instead of bytes, the request is parked under an
EffectId with Parked::park, and the shell receives that id together
with the (typed) operation. When the shell has a result, it calls
Parked::resolve with the id and the typed output.
Parked keeps a Weak reference to its EffectRouter so that resolving
a request can advance the runtime and route any follow-up effects.
Implementations§
Source§impl<App, RouteSet, Op> Parked<App, RouteSet, Op>
impl<App, RouteSet, Op> Parked<App, RouteSet, Op>
Sourcepub fn new(router: Weak<EffectRouter<App, RouteSet>>) -> Self
pub fn new(router: Weak<EffectRouter<App, RouteSet>>) -> Self
Create a parked route attached to router.
Called from your Routes::new implementation with the Weak router
handle the trait provides.
Auto Trait Implementations§
impl<A, RouteSet, Op> !Freeze for Parked<A, RouteSet, Op>
impl<A, RouteSet, Op> !RefUnwindSafe for Parked<A, RouteSet, Op>
impl<A, RouteSet, Op> Send for Parked<A, RouteSet, Op>
impl<A, RouteSet, Op> Sync for Parked<A, RouteSet, Op>
impl<A, RouteSet, Op> Unpin for Parked<A, RouteSet, Op>
impl<A, RouteSet, Op> UnsafeUnpin for Parked<A, RouteSet, Op>
impl<A, RouteSet, Op> !UnwindSafe for Parked<A, RouteSet, 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