Struct pen_ffi::cps::AsyncStack
source · [−]#[repr(C)]pub struct AsyncStack<V = ()> { /* private fields */ }
Implementations
sourceimpl<V> AsyncStack<V>
impl<V> AsyncStack<V>
pub fn new(capacity: usize) -> Self
pub fn context(&mut self) -> Option<&mut Context<'_>>
pub fn run_with_context<T>(
&mut self,
context: &mut Context<'_>,
callback: impl FnOnce(&mut Self) -> T
) -> T
pub fn suspend<T>(
&mut self,
step: StepFunction<T, V>,
continuation: ContinuationFunction<T, V>,
future: impl Future + Unpin
) -> Result<(), CpsError>
pub fn trampoline<T>(
&mut self,
continuation: ContinuationFunction<T, V>,
value: T
) -> Result<(), CpsError>
pub fn resume<T>(&mut self) -> Result<Trampoline<T, V>, CpsError>
pub fn restore<F: Future + Unpin>(&mut self) -> Result<F, CpsError>
pub fn resolved_value(&mut self) -> Option<V>
pub fn resolve(&mut self, value: V)
Methods from Deref<Target = Stack>
Trait Implementations
sourceimpl<V: Debug> Debug for AsyncStack<V>
impl<V: Debug> Debug for AsyncStack<V>
sourceimpl<V> Deref for AsyncStack<V>
impl<V> Deref for AsyncStack<V>
sourceimpl<V> DerefMut for AsyncStack<V>
impl<V> DerefMut for AsyncStack<V>
impl<V: Send> Send for AsyncStack<V>
impl<V: Sync> Sync for AsyncStack<V>
Auto Trait Implementations
impl<V> RefUnwindSafe for AsyncStack<V> where
V: RefUnwindSafe,
impl<V> Unpin for AsyncStack<V> where
V: Unpin,
impl<V> UnwindSafe for AsyncStack<V> where
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more