Struct embedded_flight_scheduler::Task
source · [−]pub struct Task<T, E = Error> {
pub f: fn(_: State<'_, T>) -> Result<(), E>,
pub hz: f32,
pub max_time_micros: u16,
pub is_high_priority: bool,
pub last_run: u16,
}Fields
f: fn(_: State<'_, T>) -> Result<(), E>hz: f32max_time_micros: u16is_high_priority: boollast_run: u16Implementations
sourceimpl<T, E> Task<T, E>
impl<T, E> Task<T, E>
pub fn new(f: fn(_: State<'_, T>) -> Result<(), E>) -> Self
pub fn high_priority(f: fn(_: State<'_, T>) -> Result<(), E>) -> Self
pub fn with_hz(self, hz: f32) -> Self
pub fn with_max_time(self, micros: u16) -> Self
pub fn with_high_priority(self, is_high_priority: bool) -> Self
Auto Trait Implementations
impl<T, E> RefUnwindSafe for Task<T, E>
impl<T, E> Send for Task<T, E>
impl<T, E> Sync for Task<T, E>
impl<T, E> Unpin for Task<T, E>
impl<T, E> UnwindSafe for Task<T, E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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