#[repr(C)]pub struct TaskReg {
pub priority: u8,
pub index_in_priority: u8,
pub _reserved: [u8; 2],
pub poll_fn: unsafe fn(user_data: *mut (), waker: &Waker) -> Poll<()>,
pub completed_fn: unsafe fn(user_data: *mut ()) -> bool,
pub user_data: *mut (),
}Expand description
Registration entry placed in the .rivet_tasks linker section.
The executor walks these to discover all statically-declared tasks.
Fields§
§priority: u8Task priority (0-31).
index_in_priority: u8Index within this priority level (assigned at init time).
_reserved: [u8; 2]Reserved padding for alignment.
poll_fn: unsafe fn(user_data: *mut (), waker: &Waker) -> Poll<()>Poll function. Type-erased: internally casts user_data back to
the concrete TaskCell<SIZE> and calls TaskCell::poll::<F>.
completed_fn: unsafe fn(user_data: *mut ()) -> boolCompleted probe. Type-erased: internally casts user_data back to
the concrete TaskCell<SIZE> and reports is_completed() — lets
the executor skip completed tasks (plan.md [B10]).
user_data: *mut ()Opaque pointer to the task’s TaskCell. Set at compile time.
Trait Implementations§
Auto Trait Implementations§
impl !Send for TaskReg
impl Freeze for TaskReg
impl RefUnwindSafe for TaskReg
impl Unpin for TaskReg
impl UnsafeUnpin for TaskReg
impl UnwindSafe for TaskReg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more