Re-exports§
pub use local::Local;
pub use runtime::asyncify;
pub use runtime::local_executor;
pub use runtime::stop_all_executors;
pub use runtime::stop_executor;
pub use runtime::Executor;
pub use sleep::sleep;
pub use yield_now::yield_now;
pub use socket2;
pub use run::*;
Modules§
- fs
- The
fs
module provides asynchronous file system operations. - io
- This module contains async io operations, utils for working with them and structs for working with them.
- local
- local_
pool - net
- run
- runtime
- sleep
- sync
- sync_
task_ queue - test
- This module contains utilities for testing such as
- utils
- yield_
now
Macros§
- asyncify
- Create a new
Asyncify
from the given function. - check_
task_ local_ safety - In
debug
mode checks if theTask
is safe to be executed. - each_
addr each_addr
is a macro that will iterate over the addresses inaddrs
and callf
for each one before first successful connection or the last address.- each_
addr_ sync each_addr_sync
is a macro that will iterate over the addresses inaddrs
and callf
for each one before first successful connection or the last address.- get_
task_ from_ context - Returns a
Task
from aContext
. - new_
local_ pool - This macro creates a new thread local pool. Because it is thread local it is lockless.
- panic_
if_ local_ in_ future - Gets the
Task
from the context and panics if it islocal
. - write_
err - shortcut for
unsafe { $ptr.write(Err($err)) }
- write_
ok - shortcut for
unsafe { $ptr.write(Ok($res)) }