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
Sourcepub fn validate_component_locations(&self) -> Result<(), Error>
pub fn validate_component_locations(&self) -> Result<(), Error>
Check point ranges, exact attachment identities and duplicate attachments. This validates metadata only; it never changes electrical topology.
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 component_locations(&self) -> &Vec<DistComponentLocation>
Sourcepub fn component_locations_mut(&mut self) -> &mut Vec<DistComponentLocation>
pub fn component_locations_mut(&mut self) -> &mut Vec<DistComponentLocation>
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) -> &Extras
Sourcepub fn extras_mut(&mut self) -> &mut Extras
pub fn extras_mut(&mut self) -> &mut Extras
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() -> Self
pub fn named(name: impl Into<String>) -> Self
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§impl Debug for MulticonductorNetwork
impl Debug for MulticonductorNetwork
Source§impl Default for MulticonductorNetwork
impl Default for MulticonductorNetwork
Source§impl<'de> Deserialize<'de> for MulticonductorNetwork
impl<'de> Deserialize<'de> for MulticonductorNetwork
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
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
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more