pub struct BuiltInExecutor;Expand description
Amiya built-in multi-thread async executor.
All instances of this type share one static executor under the hood.
The inner executor starts N threads to run async task, N is count of your cpu cores.
In most case, you do not used this type directly, all created Amiya server have a instance of it by default.
§Notice
If you disable the built-in-executor default feature, you need to call Amiya::executor()
with your custom executor. Otherwise Amiya::listen() will not compile.
Trait Implementations§
Source§impl Clone for BuiltInExecutor
impl Clone for BuiltInExecutor
Source§fn clone(&self) -> BuiltInExecutor
fn clone(&self) -> BuiltInExecutor
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 Debug for BuiltInExecutor
impl Debug for BuiltInExecutor
Source§impl Default for BuiltInExecutor
impl Default for BuiltInExecutor
Source§fn default() -> BuiltInExecutor
fn default() -> BuiltInExecutor
Returns the “default value” for a type. Read more
Source§impl Executor for BuiltInExecutor
impl Executor for BuiltInExecutor
Auto Trait Implementations§
impl Freeze for BuiltInExecutor
impl RefUnwindSafe for BuiltInExecutor
impl Send for BuiltInExecutor
impl Sync for BuiltInExecutor
impl Unpin for BuiltInExecutor
impl UnwindSafe for BuiltInExecutor
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