pub struct Dispatcher {}Implementations§
Source§impl Dispatcher
impl Dispatcher
pub fn spawn_local(future: impl Future<Output = ()> + 'static) -> TaskHandle<()> ⓘwhere
Self: 'static,
pub fn after_deadline( deadline: MonotonicInstant, ) -> impl Future<Output = ()> + 'static
pub fn client_from_zx_channel<P>( client_end: ClientEnd<P, Channel>, ) -> ClientEnd<P, Transport>
Trait Implementations§
Source§impl Clone for Dispatcher
impl Clone for Dispatcher
Source§fn clone(&self) -> Dispatcher
fn clone(&self) -> Dispatcher
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for Dispatcher
impl Default for Dispatcher
Source§fn default() -> Dispatcher
fn default() -> Dispatcher
Returns the “default value” for a type. Read more
Source§impl OnDispatcher for Dispatcher
impl OnDispatcher for Dispatcher
Source§fn on_dispatcher<R>(
&self,
f: impl FnOnce(Option<AsyncDispatcherRef<'_>>) -> R,
) -> R
fn on_dispatcher<R>( &self, f: impl FnOnce(Option<AsyncDispatcherRef<'_>>) -> R, ) -> R
Runs the function
f with a lifetime-bound AsyncDispatcherRef for this object’s dispatcher.
If the dispatcher is no longer valid, the callback will be given None. Read moreSource§fn on_maybe_dispatcher<R, E>(
&self,
f: impl FnOnce(AsyncDispatcherRef<'_>) -> Result<R, E>,
) -> Result<R, E>where
E: From<Status>,
fn on_maybe_dispatcher<R, E>(
&self,
f: impl FnOnce(AsyncDispatcherRef<'_>) -> Result<R, E>,
) -> Result<R, E>where
E: From<Status>,
Helper version of
OnDispatcher::on_dispatcher that translates an invalidated dispatcher
handle into a [Status::BAD_STATE] error instead of giving the callback None. Read moreSource§fn spawn(
&self,
future: impl Future<Output = ()> + Send + 'static,
) -> Result<JoinHandle<()>, Status>where
Self: 'static,
fn spawn(
&self,
future: impl Future<Output = ()> + Send + 'static,
) -> Result<JoinHandle<()>, Status>where
Self: 'static,
Spawn an asynchronous task on this dispatcher. If this returns
Ok then the task has
successfully been scheduled and will run or be cancelled and dropped when the dispatcher
shuts down. The returned future’s result will be Ok if the future completed
successfully, or an Err if the task did not complete for some reason (like the
dispatcher shut down). Read moreSource§fn compute<T>(
&self,
future: impl Future<Output = T> + Send + 'static,
) -> Task<T>where
T: Send + 'static,
Self: 'static,
fn compute<T>(
&self,
future: impl Future<Output = T> + Send + 'static,
) -> Task<T>where
T: Send + 'static,
Self: 'static,
Source§fn after_deadline(
&self,
deadline: Instant<MonotonicTimeline>,
) -> AfterDeadline<Self>
fn after_deadline( &self, deadline: Instant<MonotonicTimeline>, ) -> AfterDeadline<Self>
Returns a future that will fire when after the given deadline time. Read more
Auto Trait Implementations§
impl Freeze for Dispatcher
impl RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl UnwindSafe for Dispatcher
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more