Struct r3_core::kernel::timer::TimerRef

source ·
#[repr(transparent)]
pub struct TimerRef<'a, System: KernelTimer>(_, _);
Expand description

Represents a single borrowed timer in a system.

This type is ABI-compatible with System::RawTimerId. It’s logically equivalent to &'a Timer but instead stores RawTimerId directly.

See Timer for the owned counterpart and the description of this kernel object. See TimerMethods for the operations provided by this handle type.

Implementations§

source§

impl<System: KernelTimer> TimerRef<'static, System>

source

pub const fn define() -> TimerDefiner<System>

Construct a TimerDefiner to define a timer in a configuration function.

Trait Implementations§

source§

impl<System: KernelTimer> Clone for TimerRef<'_, System>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<System: KernelTimer> Debug for TimerRef<'_, System>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<System: KernelTimer> Hash for TimerRef<'_, System>

source§

fn hash<H>(&self, state: &mut H)where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<System: NotSupportedYet> PartialEq<Timer<System>> for TimerRef<'_, System>

source§

fn eq(&self, other: &Timer<System>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<System: NotSupportedYet> PartialEq<TimerRef<'_, System>> for Timer<System>

source§

fn eq(&self, other: &TimerRef<'_, System>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<System: KernelTimer> PartialEq<TimerRef<'_, System>> for TimerRef<'_, System>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<System: KernelTimer> TimerHandle for TimerRef<'_, System>

§

type System = System

The system type this object pertains to.
source§

const unsafe fn from_id(id: <System as KernelTimer>::RawTimerId) -> Self

Construct a Timer from RawTimerId. Read more
source§

const fn id(&self) -> System::RawTimerId

Get the raw RawTimerId value representing this object.
source§

const fn borrow(&self) -> TimerRef<'_, Self::System>

Borrow self as TimerRef.
source§

impl<System: KernelTimer> Copy for TimerRef<'_, System>

source§

impl<System: KernelTimer> Eq for TimerRef<'_, System>

Auto Trait Implementations§

§

impl<'a, System> RefUnwindSafe for TimerRef<'a, System>where <System as KernelTimer>::RawTimerId: RefUnwindSafe,

§

impl<'a, System> Send for TimerRef<'a, System>

§

impl<'a, System> Sync for TimerRef<'a, System>

§

impl<'a, System> Unpin for TimerRef<'a, System>where <System as KernelTimer>::RawTimerId: Unpin,

§

impl<'a, System> UnwindSafe for TimerRef<'a, System>where <System as KernelTimer>::RawTimerId: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> TimerMethods for Twhere T: TimerHandle,

source§

fn start(&self) -> Result<(), StartTimerError>

Start the timer (transition it into the Active state). Read more
source§

fn stop(&self) -> Result<(), StopTimerError>

Stop the timer (transition it into the Dormant state). Read more
source§

fn set_delay(&self, delay: Option<Duration>) -> Result<(), SetTimerDelayError>

Set the duration before the next tick. Read more
source§

fn set_period( &self, period: Option<Duration> ) -> Result<(), SetTimerPeriodError>

Set the timer period, which is a quantity to be added to the timer’s absolute arrival time on every tick. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.