pub struct StateSeriesView<'a> { /* private fields */ }Expand description
A lightweight immutable view over a canonical specification and state slice.
Both Copy and Clone copy only two references. Neither operation clones a
specification, state, payload, or vector allocation. The private
constructor ensures every public view originates from a validated
StateSeries.
Implementations§
Source§impl<'a> StateSeriesView<'a>
impl<'a> StateSeriesView<'a>
Sourcepub fn schema(self) -> &'a SystemStateSchema
pub fn schema(self) -> &'a SystemStateSchema
Returns the canonical specification shared by the borrowed states.
Sourcepub fn state_at(self, position: usize) -> Option<&'a SystemState>
pub fn state_at(self, position: usize) -> Option<&'a SystemState>
Returns a state by zero-based view position.
Sourcepub fn first_state(self) -> Option<&'a SystemState>
pub fn first_state(self) -> Option<&'a SystemState>
Returns the earliest borrowed state, or None for an empty view.
Sourcepub fn last_state(self) -> Option<&'a SystemState>
pub fn last_state(self) -> Option<&'a SystemState>
Returns the latest borrowed state, or None for an empty view.
Sourcepub fn as_state_slice(self) -> &'a [SystemState]
pub fn as_state_slice(self) -> &'a [SystemState]
Returns the complete immutable state slice.
Sourcepub fn iter(self) -> Iter<'a, SystemState> ⓘ
pub fn iter(self) -> Iter<'a, SystemState> ⓘ
Returns an iterator over borrowed states in increasing iteration order.
Trait Implementations§
Source§impl<'a> Clone for StateSeriesView<'a>
impl<'a> Clone for StateSeriesView<'a>
Source§fn clone(&self) -> StateSeriesView<'a>
fn clone(&self) -> StateSeriesView<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for StateSeriesView<'a>
Source§impl Debug for StateSeriesView<'_>
impl Debug for StateSeriesView<'_>
Source§impl<'a> IntoIterator for StateSeriesView<'a>
impl<'a> IntoIterator for StateSeriesView<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for StateSeriesView<'a>
impl<'a> !Send for StateSeriesView<'a>
impl<'a> !Sync for StateSeriesView<'a>
impl<'a> !UnwindSafe for StateSeriesView<'a>
impl<'a> Freeze for StateSeriesView<'a>
impl<'a> Unpin for StateSeriesView<'a>
impl<'a> UnsafeUnpin for StateSeriesView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more