Struct mini_enigma::components::Plugboard
source · pub struct Plugboard { /* private fields */ }
Expand description
The Enigma Plugboard or Steckerbrett
Implementations§
source§impl Plugboard
impl Plugboard
sourcepub fn new(pairs: &[(Letter, Letter)]) -> Self
pub fn new(pairs: &[(Letter, Letter)]) -> Self
Create a new Plugboard
from an array of Letter
pairs that represent cable connections
sourcepub fn remove_cable(&mut self, pair: (Letter, Letter))
pub fn remove_cable(&mut self, pair: (Letter, Letter))
Resets the value of each Letter
in the pair.
Equivalent to the logical removal of a cable iff the pair is connected
Trait Implementations§
source§impl Ord for Plugboard
impl Ord for Plugboard
source§impl PartialEq for Plugboard
impl PartialEq for Plugboard
source§impl PartialOrd for Plugboard
impl PartialOrd for Plugboard
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Plugboard
impl Eq for Plugboard
impl StructuralPartialEq for Plugboard
Auto Trait Implementations§
impl Freeze for Plugboard
impl RefUnwindSafe for Plugboard
impl Send for Plugboard
impl Sync for Plugboard
impl Unpin for Plugboard
impl UnwindSafe for Plugboard
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