Expand description
Rust bindings for the minicoro library
This crate provides safe and unsafe bindings to minicoro, a minimal asymmetric stackful cross-platform coroutine library in pure C.
Structs§
Enums§
- Coroutine
Error - Safe wrapper for coroutine errors
- Coroutine
State - Safe wrapper for coroutine states
Constants§
- MCO_
DEFAULT_ STORAGE_ SIZE - mco_
result_ MCO_ GENERIC_ ERROR - mco_
result_ MCO_ INVALID_ ARGUMENTS - mco_
result_ MCO_ INVALID_ COROUTINE - mco_
result_ MCO_ INVALID_ OPERATION - mco_
result_ MCO_ INVALID_ POINTER - mco_
result_ MCO_ MAKE_ CONTEXT_ ERROR - mco_
result_ MCO_ NOT_ ENOUGH_ SPACE - mco_
result_ MCO_ NOT_ RUNNING - mco_
result_ MCO_ NOT_ SUSPENDED - mco_
result_ MCO_ OUT_ OF_ MEMORY - mco_
result_ MCO_ STACK_ OVERFLOW - mco_
result_ MCO_ SUCCESS - mco_
result_ MCO_ SWITCH_ CONTEXT_ ERROR - mco_
state_ MCO_ DEAD - mco_
state_ MCO_ NORMAL - mco_
state_ MCO_ RUNNING - mco_
state_ MCO_ SUSPENDED
Functions§
- mco_
create ⚠ - mco_
desc_ ⚠init - mco_
destroy ⚠ - mco_
get_ ⚠bytes_ stored - mco_
get_ ⚠storage_ size - mco_
get_ ⚠user_ data - mco_
init ⚠ - mco_
peek ⚠ - mco_pop⚠
- mco_
push ⚠ - mco_
result_ ⚠description - mco_
resume ⚠ - mco_
running ⚠ - mco_
status ⚠ - mco_
uninit ⚠ - mco_
yield ⚠ - running
- Get the currently running coroutine (if any)
- yield_
current - Yield the current coroutine (safe version)
- yield_
current_ ⚠unsafe - Yield the current coroutine (unsafe version for advanced use)