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
impl Events
Sourcepub fn with_capacity(size: usize) -> Self
pub fn with_capacity(size: usize) -> Self
Creates an Events with equal memory capacity for each of its
internal event sequences.
Sourcepub fn bool_events(self, bool_events: Vec<Event<bool>>) -> Self
pub fn bool_events(self, bool_events: Vec<Event<bool>>) -> Self
Adds a sequence of Event<bool>.
Sourcepub fn i32_events(self, i32_events: Vec<Event<i32>>) -> Self
pub fn i32_events(self, i32_events: Vec<Event<i32>>) -> Self
Adds a sequence of Event<i32>.
Sourcepub fn f32_events(self, f32_events: Vec<Event<f32>>) -> Self
pub fn f32_events(self, f32_events: Vec<Event<f32>>) -> Self
Adds a sequence of Event<f32>.
Sourcepub fn f64_events(self, f64_events: Vec<Event<f64>>) -> Self
pub fn f64_events(self, f64_events: Vec<Event<f64>>) -> Self
Adds a sequence of Event<f64>.
Sourcepub fn periodic_bool_events(
self,
periodic_bool_events: Vec<PeriodicEvent<bool>>,
) -> Self
pub fn periodic_bool_events( self, periodic_bool_events: Vec<PeriodicEvent<bool>>, ) -> Self
Adds a sequence of PeriodicEvent<bool>.
Sourcepub fn periodic_u8_events(
self,
periodic_u8_events: Vec<PeriodicEvent<u8>>,
) -> Self
pub fn periodic_u8_events( self, periodic_u8_events: Vec<PeriodicEvent<u8>>, ) -> Self
Adds a sequence of PeriodicEvent<u8>.
Sourcepub fn periodic_i32_events(
self,
periodic_i32_events: Vec<PeriodicEvent<i32>>,
) -> Self
pub fn periodic_i32_events( self, periodic_i32_events: Vec<PeriodicEvent<i32>>, ) -> Self
Adds a sequence of PeriodicEvent<i32>.
Sourcepub fn periodic_f32_events(
self,
periodic_f32_events: Vec<PeriodicEvent<f32>>,
) -> Self
pub fn periodic_f32_events( self, periodic_f32_events: Vec<PeriodicEvent<f32>>, ) -> Self
Adds a sequence of PeriodicEvent<f32>.
Sourcepub fn periodic_f64_events(
self,
periodic_f64_events: Vec<PeriodicEvent<f64>>,
) -> Self
pub fn periodic_f64_events( self, periodic_f64_events: Vec<PeriodicEvent<f64>>, ) -> Self
Adds a sequence of PeriodicEvent<f64>.
Sourcepub fn add_bool_event(&mut self, bool_event: Event<bool>)
pub fn add_bool_event(&mut self, bool_event: Event<bool>)
Adds a single Event<bool>.
Sourcepub fn add_u8_event(&mut self, u8_event: Event<u8>)
pub fn add_u8_event(&mut self, u8_event: Event<u8>)
Adds a single Event<u8>.
Sourcepub fn add_i32_event(&mut self, i32_event: Event<i32>)
pub fn add_i32_event(&mut self, i32_event: Event<i32>)
Adds a single Event<i32>.
Sourcepub fn add_f32_event(&mut self, f32_event: Event<f32>)
pub fn add_f32_event(&mut self, f32_event: Event<f32>)
Adds a single Event<f32>.
Sourcepub fn add_f64_event(&mut self, f64_event: Event<f64>)
pub fn add_f64_event(&mut self, f64_event: Event<f64>)
Adds a single Event<f64>.
Sourcepub fn add_periodic_bool_event(
&mut self,
periodic_bool_event: PeriodicEvent<bool>,
)
pub fn add_periodic_bool_event( &mut self, periodic_bool_event: PeriodicEvent<bool>, )
Adds a single PeriodicEvent<bool>.
Sourcepub fn add_periodic_u8_event(&mut self, periodic_u8_event: PeriodicEvent<u8>)
pub fn add_periodic_u8_event(&mut self, periodic_u8_event: PeriodicEvent<u8>)
Adds a single PeriodicEvent<u8>.
Sourcepub fn add_periodic_i32_event(&mut self, periodic_i32_event: PeriodicEvent<i32>)
pub fn add_periodic_i32_event(&mut self, periodic_i32_event: PeriodicEvent<i32>)
Adds a single PeriodicEvent<i32>.
Sourcepub fn add_periodic_f32_event(&mut self, periodic_f32_event: PeriodicEvent<f32>)
pub fn add_periodic_f32_event(&mut self, periodic_f32_event: PeriodicEvent<f32>)
Adds a single PeriodicEvent<f32>.
Sourcepub fn add_periodic_f64_event(&mut self, periodic_f64_event: PeriodicEvent<f64>)
pub fn add_periodic_f64_event(&mut self, periodic_f64_event: PeriodicEvent<f64>)
Adds a single PeriodicEvent<f64>.
Sourcepub fn update_bool_value(&mut self, index: usize, value: bool)
pub fn update_bool_value(&mut self, index: usize, value: bool)
Updates the Event<bool> value located at the given index.
Sourcepub fn update_u8_value(&mut self, index: usize, value: u8)
pub fn update_u8_value(&mut self, index: usize, value: u8)
Updates the Event<u8> value located at the given index.
Sourcepub fn update_i32_value(&mut self, index: usize, value: i32)
pub fn update_i32_value(&mut self, index: usize, value: i32)
Updates the Event<i32> value located at the given index.
Sourcepub fn update_f32_value(&mut self, index: usize, value: f32)
pub fn update_f32_value(&mut self, index: usize, value: f32)
Updates the Event<f32> value located at the given index.
Sourcepub fn update_f64_value(&mut self, index: usize, value: f64)
pub fn update_f64_value(&mut self, index: usize, value: f64)
Updates the Event<f64> value located at the given index.
Sourcepub fn update_periodic_bool_value(&mut self, index: usize, value: bool)
pub fn update_periodic_bool_value(&mut self, index: usize, value: bool)
Updates the PeriodicEvent<bool> value located at the given index.
Sourcepub fn update_periodic_u8_value(&mut self, index: usize, value: u8)
pub fn update_periodic_u8_value(&mut self, index: usize, value: u8)
Updates the PeriodicEvent<u8> value located at the given index.
Sourcepub fn update_periodic_i32_value(&mut self, index: usize, value: i32)
pub fn update_periodic_i32_value(&mut self, index: usize, value: i32)
Updates the PeriodicEvent<i32> value located at the given index.
Sourcepub fn update_periodic_f32_value(&mut self, index: usize, value: f32)
pub fn update_periodic_f32_value(&mut self, index: usize, value: f32)
Updates the PeriodicEvent<f32> value located at the given index.
Sourcepub fn update_periodic_f64_value(&mut self, index: usize, value: f64)
pub fn update_periodic_f64_value(&mut self, index: usize, value: f64)
Updates the PeriodicEvent<f64> value located at the given index.
Sourcepub fn bool_events_as_slice(&self) -> &[Event<bool>]
pub fn bool_events_as_slice(&self) -> &[Event<bool>]
Returns an immutable slice of the Event<bool> sequence.
Sourcepub fn u8_events_as_slice(&self) -> &[Event<u8>]
pub fn u8_events_as_slice(&self) -> &[Event<u8>]
Returns an immutable slice of the Event<u8> sequence.
Sourcepub fn i32_events_as_slice(&self) -> &[Event<i32>]
pub fn i32_events_as_slice(&self) -> &[Event<i32>]
Returns an immutable slice of the Event<i32> sequence.
Sourcepub fn f32_events_as_slice(&self) -> &[Event<f32>]
pub fn f32_events_as_slice(&self) -> &[Event<f32>]
Returns an immutable slice of the Event<f32> sequence.
Sourcepub fn f64_events_as_slice(&self) -> &[Event<f64>]
pub fn f64_events_as_slice(&self) -> &[Event<f64>]
Returns an immutable slice of the Event<f64> sequence.
Sourcepub fn periodic_bool_events_as_slice(&self) -> &[PeriodicEvent<bool>]
pub fn periodic_bool_events_as_slice(&self) -> &[PeriodicEvent<bool>]
Returns an immutable slice of the PeriodicEvent<bool> sequence.
Sourcepub fn periodic_u8_events_as_slice(&self) -> &[PeriodicEvent<u8>]
pub fn periodic_u8_events_as_slice(&self) -> &[PeriodicEvent<u8>]
Returns an immutable slice of the PeriodicEvent<u8> sequence.
Sourcepub fn periodic_i32_events_as_slice(&self) -> &[PeriodicEvent<i32>]
pub fn periodic_i32_events_as_slice(&self) -> &[PeriodicEvent<i32>]
Returns an immutable slice of the PeriodicEvent<i32> sequence.
Sourcepub fn periodic_f32_events_as_slice(&self) -> &[PeriodicEvent<f32>]
pub fn periodic_f32_events_as_slice(&self) -> &[PeriodicEvent<f32>]
Returns an immutable slice of the PeriodicEvent<f32> sequence.
Sourcepub fn periodic_f64_events_as_slice(&self) -> &[PeriodicEvent<f64>]
pub fn periodic_f64_events_as_slice(&self) -> &[PeriodicEvent<f64>]
Returns an immutable slice of the PeriodicEvent<f64> sequence.