Using a Rust async function as a polled state machine

How to manually poll an async function and use the rust compiler as a state machine generator