Events

Struct Events 

Source
pub struct Events { /* private fields */ }
Expand description

All events types that can be generated by a device.

Events of the same type are stored and displayed sequentially.

Implementations§

Source§

impl Events

Source

pub const fn empty() -> Self

Creates an empty Events.

Source

pub fn with_capacity(size: usize) -> Self

Creates an Events with equal memory capacity for each of its internal event sequences.

Source

pub fn bool_events(self, bool_events: Vec<Event<bool>>) -> Self

Adds a sequence of Event<bool>.

Source

pub fn u8_events(self, u8_events: Vec<Event<u8>>) -> Self

Adds a sequence of Event<u8>.

Source

pub fn i32_events(self, i32_events: Vec<Event<i32>>) -> Self

Adds a sequence of Event<i32>.

Source

pub fn f32_events(self, f32_events: Vec<Event<f32>>) -> Self

Adds a sequence of Event<f32>.

Source

pub fn f64_events(self, f64_events: Vec<Event<f64>>) -> Self

Adds a sequence of Event<f64>.

Source

pub fn periodic_bool_events( self, periodic_bool_events: Vec<PeriodicEvent<bool>>, ) -> Self

Adds a sequence of PeriodicEvent<bool>.

Source

pub fn periodic_u8_events( self, periodic_u8_events: Vec<PeriodicEvent<u8>>, ) -> Self

Adds a sequence of PeriodicEvent<u8>.

Source

pub fn periodic_i32_events( self, periodic_i32_events: Vec<PeriodicEvent<i32>>, ) -> Self

Adds a sequence of PeriodicEvent<i32>.

Source

pub fn periodic_f32_events( self, periodic_f32_events: Vec<PeriodicEvent<f32>>, ) -> Self

Adds a sequence of PeriodicEvent<f32>.

Source

pub fn periodic_f64_events( self, periodic_f64_events: Vec<PeriodicEvent<f64>>, ) -> Self

Adds a sequence of PeriodicEvent<f64>.

Source

pub fn add_bool_event(&mut self, bool_event: Event<bool>)

Adds a single Event<bool>.

Source

pub fn add_u8_event(&mut self, u8_event: Event<u8>)

Adds a single Event<u8>.

Source

pub fn add_i32_event(&mut self, i32_event: Event<i32>)

Adds a single Event<i32>.

Source

pub fn add_f32_event(&mut self, f32_event: Event<f32>)

Adds a single Event<f32>.

Source

pub fn add_f64_event(&mut self, f64_event: Event<f64>)

Adds a single Event<f64>.

Source

pub fn add_periodic_bool_event( &mut self, periodic_bool_event: PeriodicEvent<bool>, )

Adds a single PeriodicEvent<bool>.

Source

pub fn add_periodic_u8_event(&mut self, periodic_u8_event: PeriodicEvent<u8>)

Adds a single PeriodicEvent<u8>.

Source

pub fn add_periodic_i32_event(&mut self, periodic_i32_event: PeriodicEvent<i32>)

Adds a single PeriodicEvent<i32>.

Source

pub fn add_periodic_f32_event(&mut self, periodic_f32_event: PeriodicEvent<f32>)

Adds a single PeriodicEvent<f32>.

Source

pub fn add_periodic_f64_event(&mut self, periodic_f64_event: PeriodicEvent<f64>)

Adds a single PeriodicEvent<f64>.

Source

pub fn update_bool_value(&mut self, index: usize, value: bool)

Updates the Event<bool> value located at the given index.

Source

pub fn update_u8_value(&mut self, index: usize, value: u8)

Updates the Event<u8> value located at the given index.

Source

pub fn update_i32_value(&mut self, index: usize, value: i32)

Updates the Event<i32> value located at the given index.

Source

pub fn update_f32_value(&mut self, index: usize, value: f32)

Updates the Event<f32> value located at the given index.

Source

pub fn update_f64_value(&mut self, index: usize, value: f64)

Updates the Event<f64> value located at the given index.

Source

pub fn update_periodic_bool_value(&mut self, index: usize, value: bool)

Updates the PeriodicEvent<bool> value located at the given index.

Source

pub fn update_periodic_u8_value(&mut self, index: usize, value: u8)

Updates the PeriodicEvent<u8> value located at the given index.

Source

pub fn update_periodic_i32_value(&mut self, index: usize, value: i32)

Updates the PeriodicEvent<i32> value located at the given index.

Source

pub fn update_periodic_f32_value(&mut self, index: usize, value: f32)

Updates the PeriodicEvent<f32> value located at the given index.

Source

pub fn update_periodic_f64_value(&mut self, index: usize, value: f64)

Updates the PeriodicEvent<f64> value located at the given index.

Source

pub fn bool_events_as_slice(&self) -> &[Event<bool>]

Returns an immutable slice of the Event<bool> sequence.

Source

pub fn u8_events_as_slice(&self) -> &[Event<u8>]

Returns an immutable slice of the Event<u8> sequence.

Source

pub fn i32_events_as_slice(&self) -> &[Event<i32>]

Returns an immutable slice of the Event<i32> sequence.

Source

pub fn f32_events_as_slice(&self) -> &[Event<f32>]

Returns an immutable slice of the Event<f32> sequence.

Source

pub fn f64_events_as_slice(&self) -> &[Event<f64>]

Returns an immutable slice of the Event<f64> sequence.

Source

pub fn periodic_bool_events_as_slice(&self) -> &[PeriodicEvent<bool>]

Returns an immutable slice of the PeriodicEvent<bool> sequence.

Source

pub fn periodic_u8_events_as_slice(&self) -> &[PeriodicEvent<u8>]

Returns an immutable slice of the PeriodicEvent<u8> sequence.

Source

pub fn periodic_i32_events_as_slice(&self) -> &[PeriodicEvent<i32>]

Returns an immutable slice of the PeriodicEvent<i32> sequence.

Source

pub fn periodic_f32_events_as_slice(&self) -> &[PeriodicEvent<f32>]

Returns an immutable slice of the PeriodicEvent<f32> sequence.

Source

pub fn periodic_f64_events_as_slice(&self) -> &[PeriodicEvent<f64>]

Returns an immutable slice of the PeriodicEvent<f64> sequence.

Source

pub const fn is_empty(&self) -> bool

Checks if Events is entirely empty.

Trait Implementations§

Source§

impl Clone for Events

Source§

fn clone(&self) -> Events

Returns a duplicate 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 Debug for Events

Source§

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

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

impl<'de> Deserialize<'de> for Events

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Events

Source§

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

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

impl PartialEq for Events

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Events

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Events

Auto Trait Implementations§

§

impl Freeze for Events

§

impl RefUnwindSafe for Events

§

impl Send for Events

§

impl Sync for Events

§

impl Unpin for Events

§

impl UnwindSafe for Events

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,