pub struct TaskContext {
pub id: TaskId,
pub priority: Priority,
pub name: Option<&'static str>,
}Expand description
Task execution context and metadata.
Fields§
§id: TaskIdUnique identifier for this task
priority: PriorityPriority level for scheduling
name: Option<&'static str>Optional name for debugging
Implementations§
Source§impl TaskContext
impl TaskContext
Sourcepub const fn new(id: TaskId) -> TaskContext
pub const fn new(id: TaskId) -> TaskContext
Create a new task context.
Sourcepub const fn with_priority(self, priority: Priority) -> TaskContext
pub const fn with_priority(self, priority: Priority) -> TaskContext
Set the priority for this task.
Sourcepub const fn with_name(self, name: &'static str) -> TaskContext
pub const fn with_name(self, name: &'static str) -> TaskContext
Set the name for this task.
Trait Implementations§
Source§impl Clone for TaskContext
impl Clone for TaskContext
Source§fn clone(&self) -> TaskContext
fn clone(&self) -> TaskContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TaskContext
impl RefUnwindSafe for TaskContext
impl Send for TaskContext
impl Sync for TaskContext
impl Unpin for TaskContext
impl UnsafeUnpin for TaskContext
impl UnwindSafe for TaskContext
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