[−][src]Struct rttrust::timer::TimerStatic
Implementations
impl TimerStatic
[src]
pub const fn new() -> Self
[src]
pub fn init<P>(
&'static self,
name: &str,
entry: TimerEntry<P>,
parameter: P,
time: u32,
flag: TimerFlags
) where
P: CallbackParameter,
[src]
&'static self,
name: &str,
entry: TimerEntry<P>,
parameter: P,
time: u32,
flag: TimerFlags
) where
P: CallbackParameter,
This function will initialize a timer, normally this function is used to initialize a static timer object.
@param name the name of timer @param timeout the timeout function @param parameter the parameter of timeout function @param time the tick of timer @param flag the flag of timer
pub fn detach(&'static self) -> Result<()>
[src]
This function will detach a timer from timer management.
@param timer the static timer object
@return the operation status, RT_EOK on OK; RT_ERROR on error
Wanring:
Rust timer has no cleanup function and is not able to unwind. Directly stopping a Rust timer may lead to resoucre leak.
pub fn get_timer(&'static self) -> Timer
[src]
Methods from Deref<Target = Timer>
pub fn start(&self) -> Result<()>
[src]
This function will start the timer
@return the operation status, RT_EOK on OK, -RT_ERROR on error
pub fn stop(&self) -> Result<()>
[src]
This function will stop the timer
@return the operation status, RT_EOK on OK, -RT_ERROR on error
Wanring:
Rust timer has no cleanup function and is not able to unwind. Directly stopping a Rust timer may lead to resoucre leak.
Trait Implementations
impl Deref for TimerStatic
[src]
impl Send for TimerStatic
[src]
impl Sync for TimerStatic
[src]
Will be removed once find a way to static init
Auto Trait Implementations
impl !Unpin for TimerStatic
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,
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, 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.
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>,