#[non_exhaustive]pub struct NormalizeSettings {
pub options: NormalizeOptions,
pub closed_switches: ClosedSwitchPolicy,
pub island_references: IslandReferencePolicy,
}Expand description
Options for BalancedNetwork::to_normalized_with: the
NormalizeOptions repairs and the normalization choices added after
them. Build one from its default or from NormalizeOptions and set the
rest with the with_* methods.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.options: NormalizeOptionsThe repairs BalancedNetwork::to_normalized_with_options applies.
closed_switches: ClosedSwitchPolicyWhat happens to closed switches; by default they merge.
island_references: IslandReferencePolicyHow the reference buses of a network with several islands are chosen.
IslandReferencePolicy::Stated, the default, keeps the behavior of
BalancedNetwork::to_normalized;
IslandReferencePolicy::PerIsland gives every island one reference
and leaves out the islands no in-service generator supplies.
Implementations§
Source§impl NormalizeSettings
impl NormalizeSettings
Sourcepub const fn new(options: NormalizeOptions) -> Self
pub const fn new(options: NormalizeOptions) -> Self
options with the default choice for everything else.
pub const fn with_options(self, options: NormalizeOptions) -> Self
pub const fn with_closed_switches(self, policy: ClosedSwitchPolicy) -> Self
pub const fn with_island_references(self, policy: IslandReferencePolicy) -> Self
Trait Implementations§
Source§impl Clone for NormalizeSettings
impl Clone for NormalizeSettings
impl Copy for NormalizeSettings
Source§impl Debug for NormalizeSettings
impl Debug for NormalizeSettings
Source§impl Default for NormalizeSettings
impl Default for NormalizeSettings
Source§impl From<NormalizeOptions> for NormalizeSettings
impl From<NormalizeOptions> for NormalizeSettings
Source§fn from(options: NormalizeOptions) -> Self
fn from(options: NormalizeOptions) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NormalizeSettings
impl PartialEq for NormalizeSettings
impl StructuralPartialEq for NormalizeSettings
Auto Trait Implementations§
impl Freeze for NormalizeSettings
impl RefUnwindSafe for NormalizeSettings
impl Send for NormalizeSettings
impl Sync for NormalizeSettings
impl Unpin for NormalizeSettings
impl UnsafeUnpin for NormalizeSettings
impl UnwindSafe for NormalizeSettings
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