pub struct PioScenarioSet { /* private fields */ }Expand description
A dynamically typed scenario set at the universal parser boundary.
Typed Rust code uses ScenarioSet<T> directly.
Implementations§
Source§impl PioScenarioSet
impl PioScenarioSet
Sourcepub fn from_scenarios(scenarios: Vec<Scenario<PioValue>>) -> Result<Self, Error>
pub fn from_scenarios(scenarios: Vec<Scenario<PioValue>>) -> Result<Self, Error>
Construct the dynamic form from scenarios that already crossed the universal parser boundary.
Typed Rust code should use ScenarioSet<T> and its ordinary
From conversion. 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 get(&self, id: &str) -> Option<&PioValue>
Sourcepub fn get_mut(&mut self, id: &str) -> Option<&mut PioValue>
pub fn get_mut(&mut self, id: &str) -> Option<&mut PioValue>
Mutably borrow one entry by scenario ID through copy on write.
pub fn get_at(&self, position: usize) -> Option<&PioValue>
Sourcepub fn get_at_mut(&mut self, position: usize) -> Option<&mut PioValue>
pub fn get_at_mut(&mut self, position: usize) -> Option<&mut PioValue>
Mutably borrow one entry by insertion position through copy on write.
pub fn iter(&self) -> impl ExactSizeIterator<Item = &Scenario<PioValue>>
Sourcepub fn iter_mut(
&mut self,
) -> impl ExactSizeIterator<Item = &mut Scenario<PioValue>>
pub fn iter_mut( &mut self, ) -> impl ExactSizeIterator<Item = &mut Scenario<PioValue>>
Iterate over mutable scenario entries through one copy on write split.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for PioScenarioSet
impl Clone for PioScenarioSet
Source§fn clone(&self) -> PioScenarioSet
fn clone(&self) -> PioScenarioSet
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 PioScenarioSet
impl RefUnwindSafe for PioScenarioSet
impl Send for PioScenarioSet
impl Sync for PioScenarioSet
impl Unpin for PioScenarioSet
impl UnsafeUnpin for PioScenarioSet
impl UnwindSafe for PioScenarioSet
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