pub struct DynamicRecord { /* private fields */ }Expand description
One DYR model record. Parameters remain ordered and lexically decoded; model-specific interpretation belongs in a separate, schema-backed layer.
Implementations§
Source§impl DynamicRecord
impl DynamicRecord
Sourcepub fn model_name(&self) -> &str
pub fn model_name(&self) -> &str
Raw model name as represented by the record, without surrounding quotes.
Sourcepub fn key(&self) -> &str
pub fn key(&self) -> &str
The first DYR field, without surrounding quotes. Most models key a record by an unquoted bus number; dc line and similar models name their device here in quotes instead.
Sourcepub fn bus_id(&self) -> Option<u32>
pub fn bus_id(&self) -> Option<u32>
Bus number in an unquoted first field, or None for a record keyed
by a quoted device name such as a dc line. Load models keyed by area,
zone or owner state that number here too; it is not a bus.
Sourcepub fn device_id(&self) -> Option<&str>
pub fn device_id(&self) -> Option<&str>
Optional second device-key field, commonly a generator/load identifier.
Sourcepub fn parameters(&self) -> &[String]
pub fn parameters(&self) -> &[String]
Ordered parameter tokens after the generic bus/model/device fields.
Sourcepub fn raw_record(&self) -> &str
pub fn raw_record(&self) -> &str
The record’s source spelling, excluding the terminating slash.
Trait Implementations§
Source§impl Clone for DynamicRecord
impl Clone for DynamicRecord
Source§fn clone(&self) -> DynamicRecord
fn clone(&self) -> DynamicRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DynamicRecord
impl Debug for DynamicRecord
impl Eq for DynamicRecord
Source§impl PartialEq for DynamicRecord
impl PartialEq for DynamicRecord
impl StructuralPartialEq for DynamicRecord
Auto Trait Implementations§
impl Freeze for DynamicRecord
impl RefUnwindSafe for DynamicRecord
impl Send for DynamicRecord
impl Sync for DynamicRecord
impl Unpin for DynamicRecord
impl UnsafeUnpin for DynamicRecord
impl UnwindSafe for DynamicRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.