pub struct MulticonductorNetwork { /* private fields */ }Expand description
A multiconductor distribution network: an immutable cheap to clone owning handle over private shared tables.
Cloning the handle bumps one reference count and clones no table
allocation. Reads go through the per field accessors; the *_mut
accessors copy the shared tables once on first write to a shared handle
(copy on write), so no other handle ever observes a mutation. Per element
("class.name" key), the tables also record which fields the reader
materialized from a format default rather than the source text. The
original source text for the byte exact echo tier is not carried here; it
lives on the PioModule a parse returns,
alongside this network.
Implementations§
Source§impl MulticonductorNetwork
impl MulticonductorNetwork
pub fn name(&self) -> &Option<String>
Sourcepub fn name_mut(&mut self) -> &mut Option<String>
pub fn name_mut(&mut self) -> &mut Option<String>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn geo(&self) -> &Option<DistGeoMeta>
Sourcepub fn geo_mut(&mut self) -> &mut Option<DistGeoMeta>
pub fn geo_mut(&mut self) -> &mut Option<DistGeoMeta>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn buses(&self) -> &Vec<DistBus>
Sourcepub fn buses_mut(&mut self) -> &mut Vec<DistBus>
pub fn buses_mut(&mut self) -> &mut Vec<DistBus>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn line_codes(&self) -> &Vec<DistLineCode>
Sourcepub fn line_codes_mut(&mut self) -> &mut Vec<DistLineCode>
pub fn line_codes_mut(&mut self) -> &mut Vec<DistLineCode>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn lines(&self) -> &Vec<DistLine>
Sourcepub fn lines_mut(&mut self) -> &mut Vec<DistLine>
pub fn lines_mut(&mut self) -> &mut Vec<DistLine>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn switches(&self) -> &Vec<DistSwitch>
Sourcepub fn switches_mut(&mut self) -> &mut Vec<DistSwitch>
pub fn switches_mut(&mut self) -> &mut Vec<DistSwitch>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn transformers(&self) -> &Vec<DistTransformer>
Sourcepub fn transformers_mut(&mut self) -> &mut Vec<DistTransformer>
pub fn transformers_mut(&mut self) -> &mut Vec<DistTransformer>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn loads(&self) -> &Vec<DistLoad>
Sourcepub fn loads_mut(&mut self) -> &mut Vec<DistLoad>
pub fn loads_mut(&mut self) -> &mut Vec<DistLoad>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn generators(&self) -> &Vec<DistGenerator>
Sourcepub fn generators_mut(&mut self) -> &mut Vec<DistGenerator>
pub fn generators_mut(&mut self) -> &mut Vec<DistGenerator>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn ibrs(&self) -> &Vec<DistIbr>
Sourcepub fn ibrs_mut(&mut self) -> &mut Vec<DistIbr>
pub fn ibrs_mut(&mut self) -> &mut Vec<DistIbr>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn control_profiles(&self) -> &Vec<DistControlProfile>
Sourcepub fn control_profiles_mut(&mut self) -> &mut Vec<DistControlProfile>
pub fn control_profiles_mut(&mut self) -> &mut Vec<DistControlProfile>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn shunts(&self) -> &Vec<DistShunt>
Sourcepub fn shunts_mut(&mut self) -> &mut Vec<DistShunt>
pub fn shunts_mut(&mut self) -> &mut Vec<DistShunt>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn capacitors(&self) -> &Vec<DistCapacitor>
Sourcepub fn capacitors_mut(&mut self) -> &mut Vec<DistCapacitor>
pub fn capacitors_mut(&mut self) -> &mut Vec<DistCapacitor>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn sources(&self) -> &Vec<VoltageSource>
Sourcepub fn sources_mut(&mut self) -> &mut Vec<VoltageSource>
pub fn sources_mut(&mut self) -> &mut Vec<VoltageSource>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn untyped_objects(&self) -> &Vec<UntypedObject>
Sourcepub fn untyped_objects_mut(&mut self) -> &mut Vec<UntypedObject>
pub fn untyped_objects_mut(&mut self) -> &mut Vec<UntypedObject>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn commands(&self) -> &Vec<(String, String)>
Sourcepub fn commands_mut(&mut self) -> &mut Vec<(String, String)>
pub fn commands_mut(&mut self) -> &mut Vec<(String, String)>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn options(&self) -> &Vec<(String, String)>
Sourcepub fn options_mut(&mut self) -> &mut Vec<(String, String)>
pub fn options_mut(&mut self) -> &mut Vec<(String, String)>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn defaulted(&self) -> &BTreeMap<String, Vec<&'static str>>
Sourcepub fn defaulted_mut(&mut self) -> &mut BTreeMap<String, Vec<&'static str>>
pub fn defaulted_mut(&mut self) -> &mut BTreeMap<String, Vec<&'static str>>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn source_format(&self) -> &Option<DistSourceFormat>
Sourcepub fn source_format_mut(&mut self) -> &mut Option<DistSourceFormat>
pub fn source_format_mut(&mut self) -> &mut Option<DistSourceFormat>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
pub fn extras(&self) -> &BTreeMap<String, Value>
Sourcepub fn extras_mut(&mut self) -> &mut BTreeMap<String, Value>
pub fn extras_mut(&mut self) -> &mut BTreeMap<String, Value>
Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.
Source§impl MulticonductorNetwork
impl MulticonductorNetwork
Sourcepub fn base_frequency(&self) -> f64
pub fn base_frequency(&self) -> f64
Hz.
pub fn base_frequency_mut(&mut self) -> &mut f64
Source§impl MulticonductorNetwork
impl MulticonductorNetwork
pub fn new() -> MulticonductorNetwork
pub fn named(name: impl Into<String>) -> MulticonductorNetwork
Sourcepub fn bus(&self, id: &str) -> Option<&DistBus>
pub fn bus(&self, id: &str) -> Option<&DistBus>
Case insensitive, matching the source formats’ name semantics.
Sourcepub fn linecode(&self, name: &str) -> Option<&DistLineCode>
pub fn linecode(&self, name: &str) -> Option<&DistLineCode>
Case insensitive, matching the source formats’ name semantics.
Trait Implementations§
Source§impl Clone for MulticonductorNetwork
impl Clone for MulticonductorNetwork
Source§fn clone(&self) -> MulticonductorNetwork
fn clone(&self) -> MulticonductorNetwork
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 MulticonductorNetwork
impl Debug for MulticonductorNetwork
Source§impl Default for MulticonductorNetwork
impl Default for MulticonductorNetwork
Source§fn default() -> MulticonductorNetwork
fn default() -> MulticonductorNetwork
Source§impl<'de> Deserialize<'de> for MulticonductorNetwork
impl<'de> Deserialize<'de> for MulticonductorNetwork
Source§fn deserialize<D>(
deserializer: D,
) -> Result<MulticonductorNetwork, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<MulticonductorNetwork, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<MulticonductorNetwork> for PioValue
impl From<MulticonductorNetwork> for PioValue
Source§fn from(value: MulticonductorNetwork) -> Self
fn from(value: MulticonductorNetwork) -> Self
Source§impl JsonSchema for MulticonductorNetwork
Available on crate feature schema only.
impl JsonSchema for MulticonductorNetwork
schema only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more