pub struct Circuit {
pub id: CircuitId,
pub parent: Option<CircuitId>,
pub label: String,
pub fuse_current: Option<Current>,
pub power_limit: Option<Power>,
}Expand description
One node of the electrical tree.
Fields§
§id: CircuitIdThe name used in configuration.
parent: Option<CircuitId>The circuit this one hangs off. None for the root.
label: StringA human label for the UI.
fuse_current: Option<Current>The fuse rating per outer conductor.
power_limit: Option<Power>A power ceiling that is not simply the fuse — a cable rating, or a limit the operator wants for their own reasons.
Implementations§
Source§impl Circuit
impl Circuit
Sourcepub fn new(
id: CircuitId,
parent: Option<CircuitId>,
fuse_current: Current,
) -> Self
pub fn new( id: CircuitId, parent: Option<CircuitId>, fuse_current: Current, ) -> Self
A circuit with a fuse rating.
Sourcepub fn symmetric_power_limit(&self, voltage: Voltage) -> Option<Power>
pub fn symmetric_power_limit(&self, voltage: Voltage) -> Option<Power>
The tightest power ceiling this circuit imposes on a symmetric three-phase draw, given the nominal voltage.
A single-phase asset is bounded by the per-phase current instead; the
arbiter uses Circuit::fuse_current directly for that case, because
collapsing a per-phase limit into a total is exactly the mistake that
lets one conductor overload while the total looks fine.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Circuit
impl<'de> Deserialize<'de> for Circuit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Circuit
Auto Trait Implementations§
impl Freeze for Circuit
impl RefUnwindSafe for Circuit
impl Send for Circuit
impl Sync for Circuit
impl Unpin for Circuit
impl UnsafeUnpin for Circuit
impl UnwindSafe for Circuit
Blanket Implementations§
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