fabaccess-bffh/runtime/lightproc/src/proc_vtable.rs

26 lines
690 B
Rust
Raw Normal View History

2021-11-14 17:50:59 +01:00
use std::task::RawWakerVTable;
/// The vtable for a proc.
pub(crate) struct ProcVTable {
/// The raw waker vtable.
pub(crate) raw_waker: RawWakerVTable,
/// Schedules the proc.
pub(crate) schedule: unsafe fn(*const ()),
/// Drops the future inside the proc.
pub(crate) drop_future: unsafe fn(*const ()),
/// Returns a pointer to the output stored after completion.
pub(crate) get_output: unsafe fn(*const ()) -> *const (),
/// Drops a waker or a proc.
pub(crate) decrement: unsafe fn(ptr: *const ()),
/// Destroys the proc.
pub(crate) destroy: unsafe fn(*const ()),
/// Ticks the proc.
pub(crate) tick: unsafe fn(*const ()),
}