pub trait HostInvocation: Send {
// Required methods
fn subscribe(
&mut self,
self_: Resource<Invocation>,
) -> Result<Resource<Pollable>>;
fn finish(
&mut self,
this: Resource<Invocation>,
) -> impl Future<Output = Result<Result<(Resource<OutgoingChannel>, Resource<IncomingChannel>), Resource<Error>>>> + Send;
fn drop(&mut self, rep: Resource<Invocation>) -> Result<()>;
}Required Methods§
Sourcefn subscribe(
&mut self,
self_: Resource<Invocation>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<Invocation>, ) -> Result<Resource<Pollable>>
Returns a pollable, which will be ready once the invocation has been transmitted
Sourcefn finish(
&mut self,
this: Resource<Invocation>,
) -> impl Future<Output = Result<Result<(Resource<OutgoingChannel>, Resource<IncomingChannel>), Resource<Error>>>> + Send
fn finish( &mut self, this: Resource<Invocation>, ) -> impl Future<Output = Result<Result<(Resource<OutgoingChannel>, Resource<IncomingChannel>), Resource<Error>>>> + Send
Finish will consume this invocation returning an error, if any.
fn drop(&mut self, rep: Resource<Invocation>) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<_T: HostInvocation + ?Sized + Send> HostInvocation for &mut _T
impl<_T: HostInvocation + ?Sized + Send> HostInvocation for &mut _T
Source§fn subscribe(
&mut self,
self_: Resource<Invocation>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<Invocation>, ) -> Result<Resource<Pollable>>
Returns a pollable, which will be ready once the invocation has been transmitted
Source§fn finish(
&mut self,
this: Resource<Invocation>,
) -> impl Future<Output = Result<Result<(Resource<OutgoingChannel>, Resource<IncomingChannel>), Resource<Error>>>> + Send
fn finish( &mut self, this: Resource<Invocation>, ) -> impl Future<Output = Result<Result<(Resource<OutgoingChannel>, Resource<IncomingChannel>), Resource<Error>>>> + Send
Finish will consume this invocation returning an error, if any.