# Async Coroutine
[](#license)
[](https://github.com/jannik4/async_coroutine/actions)
[](https://crates.io/crates/async_coroutine)
[](https://docs.rs/async_coroutine)
This crate provides a coroutine implementation based on Rust's async/await syntax.
## Usage
```rust
use async_coroutine::{Coroutine, State};
assert_eq!(handle.yield_(true).await, 2);
assert_eq!(handle.yield_(false).await, 3);
"Bye"
});
assert_eq!(co.resume_with(1), State::Yield(true));
assert_eq!(co.resume_with(2), State::Yield(false));
assert_eq!(co.resume_with(3), State::Complete("Bye"));
```