Struct TimerProperties
pub struct TimerProperties {
pub id: Option<u64>,
pub supported_resolutions: Option<Vec<Resolution>>,
pub max_ticks: Option<u64>,
pub supports_event: Option<bool>,
pub supports_wait: Option<bool>,
/* private fields */
}
Expand description
Properties for a specific timer abstracted by the driver.
Fields§
§id: Option<u64>
Unique identifier for this timer.
The id
is stable for a given timer, i.e. it does not change across different clients
or different connections from the same client.
Required.
supported_resolutions: Option<Vec<Resolution>>
Retrieves the resolutions supported by this timer.
Required.
max_ticks: Option<u64>
Range in ticks.
This is the maximum amount of time that can be set in terms of ticks when a timer is started. The maximum range in actual time (e.g. nanoseconds) depends on the resolution used.
NOTE: The value reported here does not need to be identical to what
the hardware actually supports. The driver MAY provide the support for
the reported max_ticks
that is greater than the largest value of ticks
that can be put into the device’s hardware register. The driver supports
a greater value of max_ticks
by re-programming the hardware counter multiple times
with its maximum supported interval, with an interrupt generated after
each re-programming. If you want as few re-programmings (and interrupts)
to happen as possible, as may be the case when using the hrtimer in a power-aware
context, select the coarsest available resolution from [supported_resolutions].
This will ensure the longest possible wall-clock time passes without a re-program.
Required.
supports_event: Option<bool>
If true then the SetEvent
method is supported, if false or not present it is not
supported.
Optional.
supports_wait: Option<bool>
If true then the StartAndWait
and StartAndWait2
methods are supported, if false or
not present these methods are not supported.
Optional.
Trait Implementations§
§impl Clone for TimerProperties
impl Clone for TimerProperties
§fn clone(&self) -> TimerProperties
fn clone(&self) -> TimerProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for TimerProperties
impl Debug for TimerProperties
§impl<D> Decode<TimerProperties, D> for TimerPropertieswhere
D: ResourceDialect,
impl<D> Decode<TimerProperties, D> for TimerPropertieswhere
D: ResourceDialect,
§fn new_empty() -> TimerProperties
fn new_empty() -> TimerProperties
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for TimerProperties
impl Default for TimerProperties
§fn default() -> TimerProperties
fn default() -> TimerProperties
§impl<D> Encode<TimerProperties, D> for &TimerPropertieswhere
D: ResourceDialect,
impl<D> Encode<TimerProperties, D> for &TimerPropertieswhere
D: ResourceDialect,
§impl PartialEq for TimerProperties
impl PartialEq for TimerProperties
§impl TypeMarker for TimerProperties
impl TypeMarker for TimerProperties
§type Owned = TimerProperties
type Owned = TimerProperties
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for TimerProperties
impl ValueTypeMarker for TimerProperties
§type Borrowed<'a> = &'a TimerProperties
type Borrowed<'a> = &'a TimerProperties
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<TimerProperties as TypeMarker>::Owned,
) -> <TimerProperties as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<TimerProperties as TypeMarker>::Owned, ) -> <TimerProperties as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.