pub struct NoBackground;Expand description
An executor that refuses all background work, for hosts that have none.
Timers still fire, on park, so deadline-driven callers
in a synchronous driver make progress.
Trait Implementations§
Source§impl Clone for NoBackground
impl Clone for NoBackground
Source§fn clone(&self) -> NoBackground
fn clone(&self) -> NoBackground
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NoBackground
Source§impl Debug for NoBackground
impl Debug for NoBackground
Source§impl Default for NoBackground
impl Default for NoBackground
Source§fn default() -> NoBackground
fn default() -> NoBackground
Returns the “default value” for a type. Read more
Source§impl Executor for NoBackground
impl Executor for NoBackground
Source§fn spawn(
&self,
_name: &'static str,
_job: Box<dyn FnOnce() + Send>,
) -> Result<(), Unsupported>
fn spawn( &self, _name: &'static str, _job: Box<dyn FnOnce() + Send>, ) -> Result<(), Unsupported>
fn wake_at(&self, _deadline: Instant, wake: WakeHandle)
Source§fn park(&self, _deadline: Instant)
fn park(&self, _deadline: Instant)
Block until background work may have made progress, or until
deadline. For synchronous drivers only (headless capture, tests) —
never call this on a live UI thread.fn now(&self) -> Instant
Auto Trait Implementations§
impl Forget for NoBackground
impl Freeze for NoBackground
impl Move for NoBackground
impl RefUnwindSafe for NoBackground
impl Send for NoBackground
impl Sync for NoBackground
impl Unpin for NoBackground
impl UnsafeUnpin for NoBackground
impl UnwindSafe for NoBackground
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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