Crate generator

source ·
Expand description

generator

Rust generator library

Macros

it’s a special return instruction that yield nothing but only terminate the generator safely

Structs

Generator helper
passed in scope type it not use the context to pass data, but keep it’s own data ref this struct provide both compile type info and runtime data

Enums

yield panic error types

Functions

coroutine get passed in yield para
set current coroutine para in user space
coroutine yield
get the current context local data only coroutine support local data
get_yieldDeprecated
get the passed in para
check the current context if it’s generator
yield_Deprecated
yield and get the send para
yield_fromDeprecated
yield_from
yield_withDeprecated
yield something without catch passed in para

Type Definitions

the generator type, the functor passed to it must be Send
the local generator type, can’t Send