Struct r3_core::kernel::task::TaskDefiner
source · pub struct TaskDefiner<System> { /* private fields */ }
Expand description
The definer (static builder) for TaskRef
.
Implementations
sourceimpl<System: KernelBase> TaskDefiner<System>
impl<System: KernelBase> TaskDefiner<System>
sourcepub const fn start<C: IntoClosureConst>(self, start: C) -> Self
pub const fn start<C: IntoClosureConst>(self, start: C) -> Self
[Required] Specify the task’s entry point.
sourcepub const fn stack_size(self, stack_size: usize) -> Self
pub const fn stack_size(self, stack_size: usize) -> Self
Specify the task’s stack size.
sourcepub const fn priority(self, priority: usize) -> Self
pub const fn priority(self, priority: usize) -> Self
[Required] Specify the task’s initial base priority. Tasks with
lower priority values execute first. The value must be in range
0..
num_task_priority_levels
.
sourcepub const fn active(self, active: bool) -> Self
pub const fn active(self, active: bool) -> Self
Specify whether the task should be activated at system startup.
Defaults to false
(don’t activate).
sourcepub const fn finish<C: CfgTask<System = System>>(
self,
cfg: &mut Cfg<'_, C>
) -> StaticTask<System>
pub const fn finish<C: CfgTask<System = System>>(
self,
cfg: &mut Cfg<'_, C>
) -> StaticTask<System>
Complete the definition of a task, returning a reference to the task.
Trait Implementations
sourceimpl<System: KernelBase> ExecutableDefiner for TaskDefiner<System>
impl<System: KernelBase> ExecutableDefiner for TaskDefiner<System>
Auto Trait Implementations
impl<System> RefUnwindSafe for TaskDefiner<System>
impl<System> Send for TaskDefiner<System>
impl<System> Sync for TaskDefiner<System>
impl<System> Unpin for TaskDefiner<System>
impl<System> UnwindSafe for TaskDefiner<System>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ExecutableDefinerExt for Twhere
T: ExecutableDefiner,
impl<T> ExecutableDefinerExt for Twhere
T: ExecutableDefiner,
sourceconst fn start_with_bind<Binder, Func>(self, binder: Binder, func: Func) -> Twhere
Func: FnBind<Binder, Output = ()>,
const fn start_with_bind<Binder, Func>(self, binder: Binder, func: Func) -> Twhere
Func: FnBind<Binder, Output = ()>,
Use the specified function with dependency as the entry point of the
executable object being defined. Read more