pub struct PioTimeSeries { /* private fields */ }Expand description
A dynamically typed time series at the universal parser boundary.
Typed Rust code uses TimeSeries<T> directly. This wrapper preserves the
element type for empty collections and lets C and PowerIO IR report the
same structural type name without a flattened collection registry.
Implementations§
Source§impl PioTimeSeries
impl PioTimeSeries
Sourcepub fn from_values(
time_points: Vec<TimePoint>,
values: Vec<PioValue>,
) -> Result<Self, Error>
pub fn from_values( time_points: Vec<TimePoint>, values: Vec<PioValue>, ) -> Result<Self, Error>
Construct the dynamic form from values that already crossed the universal parser boundary.
Typed Rust code should use TimeSeries<T> and its ordinary
From conversion. This constructor exists for dynamic language
bindings. An empty input has no value from which to infer T and is
rejected.
pub fn element_type(&self) -> &str
pub fn type_name(&self) -> &str
pub fn time_points(&self) -> &[TimePoint]
pub fn get(&self, index: usize) -> Option<&PioValue>
Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut PioValue>
pub fn get_mut(&mut self, index: usize) -> Option<&mut PioValue>
Mutably borrow one entry through the collection’s copy on write storage.
pub fn iter(&self) -> impl ExactSizeIterator<Item = (&TimePoint, &PioValue)>
Sourcepub fn iter_mut(
&mut self,
) -> impl ExactSizeIterator<Item = (&TimePoint, &mut PioValue)>
pub fn iter_mut( &mut self, ) -> impl ExactSizeIterator<Item = (&TimePoint, &mut PioValue)>
Iterate over mutable entries through one copy on write split.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for PioTimeSeries
impl Clone for PioTimeSeries
Source§fn clone(&self) -> PioTimeSeries
fn clone(&self) -> PioTimeSeries
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 moreAuto Trait Implementations§
impl Freeze for PioTimeSeries
impl RefUnwindSafe for PioTimeSeries
impl Send for PioTimeSeries
impl Sync for PioTimeSeries
impl Unpin for PioTimeSeries
impl UnsafeUnpin for PioTimeSeries
impl UnwindSafe for PioTimeSeries
Blanket Implementations§
impl<T> Allocation for T
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