Skip to main content

MulticonductorNetwork

Struct MulticonductorNetwork 

Source
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

Source

pub fn to_graph(&self) -> DistGraph

Transform this network into a render ready bus and terminal graph.

Source§

impl MulticonductorNetwork

Source

pub fn name(&self) -> &Option<String>

Source

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.

Source

pub fn geo(&self) -> &Option<DistGeoMeta>

Source

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.

Source

pub fn buses(&self) -> &Vec<DistBus>

Source

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.

Source

pub fn line_codes(&self) -> &Vec<DistLineCode>

Source

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.

Source

pub fn lines(&self) -> &Vec<DistLine>

Source

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.

Source

pub fn switches(&self) -> &Vec<DistSwitch>

Source

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.

Source

pub fn transformers(&self) -> &Vec<DistTransformer>

Source

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.

Source

pub fn loads(&self) -> &Vec<DistLoad>

Source

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.

Source

pub fn generators(&self) -> &Vec<DistGenerator>

Source

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.

Source

pub fn ibrs(&self) -> &Vec<DistIbr>

Source

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.

Source

pub fn control_profiles(&self) -> &Vec<DistControlProfile>

Source

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.

Source

pub fn shunts(&self) -> &Vec<DistShunt>

Source

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.

Source

pub fn capacitors(&self) -> &Vec<DistCapacitor>

Source

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.

Source

pub fn sources(&self) -> &Vec<VoltageSource>

Source

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.

Source

pub fn untyped_objects(&self) -> &Vec<UntypedObject>

Source

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.

Source

pub fn commands(&self) -> &Vec<(String, String)>

Source

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.

Source

pub fn options(&self) -> &Vec<(String, String)>

Source

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.

Source

pub fn defaulted(&self) -> &BTreeMap<String, Vec<&'static str>>

Source

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.

Source

pub fn source_format(&self) -> &Option<DistSourceFormat>

Source

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.

Source

pub fn extras(&self) -> &BTreeMap<String, Value>

Source

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

Source

pub fn base_frequency(&self) -> f64

Hz.

Source

pub fn base_frequency_mut(&mut self) -> &mut f64

Source§

impl MulticonductorNetwork

Source

pub fn new() -> MulticonductorNetwork

Source

pub fn named(name: impl Into<String>) -> MulticonductorNetwork

Source

pub fn bus(&self, id: &str) -> Option<&DistBus>

Case insensitive, matching the source formats’ name semantics.

Source

pub fn linecode(&self, name: &str) -> Option<&DistLineCode>

Case insensitive, matching the source formats’ name semantics.

Trait Implementations§

Source§

impl Clone for MulticonductorNetwork

Source§

fn clone(&self) -> MulticonductorNetwork

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MulticonductorNetwork

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MulticonductorNetwork

Source§

fn default() -> MulticonductorNetwork

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MulticonductorNetwork

Source§

fn deserialize<D>( deserializer: D, ) -> Result<MulticonductorNetwork, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<MulticonductorNetwork> for PioValue

Source§

fn from(value: MulticonductorNetwork) -> Self

Converts to this type from the input type.
Source§

impl JsonSchema for MulticonductorNetwork

Available on crate feature schema only.
Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for MulticonductorNetwork

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V