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§
impl Copy for Plugboard
impl Eq for Plugboard
Source§impl Ord for Plugboard
impl Ord for Plugboard
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Plugboard
impl PartialOrd 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 UnsafeUnpin 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