pub enum FaultPhase {
Abc,
A,
B,
C,
Ab,
Ac,
Bc,
}Expand description
Which phase or phase pair a fault involves.
Variants§
Implementations§
Source§impl FaultPhase
impl FaultPhase
Sourcepub fn from_code(code: i8) -> Result<Option<Self>, ShortCircuitError>
pub fn from_code(code: i8) -> Result<Option<Self>, ShortCircuitError>
Reads power-grid-model’s integer code. -1 is its default_value
sentinel, which is not a phase — it is resolved against the fault type
by FaultType::default_phase, so it is returned as None here
rather than guessed at.
Trait Implementations§
Source§impl Clone for FaultPhase
impl Clone for FaultPhase
impl Copy for FaultPhase
Source§impl Debug for FaultPhase
impl Debug for FaultPhase
impl Eq for FaultPhase
Source§impl PartialEq for FaultPhase
impl PartialEq for FaultPhase
impl StructuralPartialEq for FaultPhase
Auto Trait Implementations§
impl Freeze for FaultPhase
impl RefUnwindSafe for FaultPhase
impl Send for FaultPhase
impl Sync for FaultPhase
impl Unpin for FaultPhase
impl UnsafeUnpin for FaultPhase
impl UnwindSafe for FaultPhase
Blanket Implementations§
impl<T> Boilerplate 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
Mutably borrows from an owned value. Read more
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,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more