Crate tinycoro

Crate tinycoro 

Source
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§

Coroutine
A safe wrapper around a minicoro coroutine
mco_coro
mco_desc

Enums§

CoroutineError
Safe wrapper for coroutine errors
CoroutineState
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)

Type Aliases§

mco_result
mco_state