#[non_exhaustive]pub enum Compat {
NamedGlobal {
name: &'static str,
spawn: fn(Task),
},
Local(fn() -> Option<fn(Task)>),
}
Available on crate feature
compat
only.Expand description
Item of COMPATS to encapsulate functions to spawn task for async runtime.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NamedGlobal
Named global function to spawn task.
Local(fn() -> Option<fn(Task)>)
Local function to detect async runtimes.
Auto Trait Implementations§
impl Freeze for Compat
impl RefUnwindSafe for Compat
impl Send for Compat
impl Sync for Compat
impl Unpin for Compat
impl UnwindSafe for Compat
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