Struct crs_bind::rtos::Task [−][src]
Represents a FreeRTOS task.
Implementations
impl Task[src]
pub const DEFAULT_PRIORITY: u32[src]
The default priority for new tasks.
pub const DEFAULT_STACK_DEPTH: u16[src]
The default stack depth for new tasks.
pub fn delay(dur: Duration)[src]
Delays the current task by the specified duration.
pub fn current() -> Task[src]
Gets the current task.
pub fn find_by_name(name: &str) -> Result<Task, Error>[src]
Finds a task by its name.
pub fn spawn<F>(f: F) -> Result<Task, Error> where
F: FnOnce() + Send + 'static, [src]
F: FnOnce() + Send + 'static,
Spawns a new task with no name and the default priority and stack depth.
pub fn spawn_ext<F>(
name: &str,
priority: u32,
stack_depth: u16,
f: F
) -> Result<Task, Error> where
F: FnOnce() + Send + 'static, [src]
name: &str,
priority: u32,
stack_depth: u16,
f: F
) -> Result<Task, Error> where
F: FnOnce() + Send + 'static,
Spawns a new task with the specified name, priority and stack depth.
pub fn spawn_raw(
name: &str,
priority: u32,
stack_depth: u16,
f: unsafe extern "C" fn(arg1: *mut c_void),
arg: *mut c_void
) -> Result<Task, Error>[src]
name: &str,
priority: u32,
stack_depth: u16,
f: unsafe extern "C" fn(arg1: *mut c_void),
arg: *mut c_void
) -> Result<Task, Error>
Spawns a new task from a C function pointer and an arbitrary data pointer.
pub fn name(&self) -> String[src]
Gets the name of the task.
pub fn priority(&self) -> u32[src]
Gets the priority of the task.
pub fn state(&self) -> TaskState[src]
Gets the state of the task.
pub unsafe fn delete(&self)[src]
Unsafely deletes the task.
Safety
This is unsafe because it does not guarantee that the task’s code safely unwinds (i.e., that destructors are called, memory is freed and other resources are released).
Trait Implementations
impl Clone for Task[src]
fn clone(&self) -> Task[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for Task[src]
impl Eq for Task[src]
impl Ord for Task[src]
fn cmp(&self, other: &Task) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<Task> for Task[src]
impl PartialOrd<Task> for Task[src]
fn partial_cmp(&self, other: &Task) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl Send for Task[src]
impl StructuralEq for Task[src]
impl StructuralPartialEq for Task[src]
impl Sync for Task[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,