1 //! # generator 2 //! 3 //! Rust generator library 4 //! 5 6 #![cfg_attr(nightly, feature(core_intrinsics))] 7 #![cfg_attr(nightly, feature(thread_local))] 8 #![cfg_attr(test, deny(warnings))] 9 #![deny(missing_docs)] 10 #![allow(deprecated)] 11 #![allow(non_fmt_panic)] 12 13 #[macro_use] 14 extern crate log; 15 16 mod detail; 17 mod gen_impl; 18 mod reg_context; 19 mod rt; 20 mod scope; 21 mod stack; 22 mod yield_; 23 24 pub use crate::gen_impl::{Generator, Gn}; 25 pub use crate::rt::{get_local_data, is_generator, Error}; 26 pub use crate::scope::Scope; 27 pub use crate::yield_::{ 28 co_get_yield, co_set_para, co_yield_with, done, get_yield, yield_, yield_from, yield_with, 29 }; 30