Enum onetimepad::OneTimePadError
source · pub enum OneTimePadError {
PadBufferNotLongEnough,
CharacterNotInAlphabet(char),
}
Expand description
Possible errors whilst working with one time pads.
Variants§
PadBufferNotLongEnough
The pad buffer isn’t long enough for the input string to be processed.
Append some more characters to the pad buffer with push_to_pad
or
use a shorter input string.
CharacterNotInAlphabet(char)
One of the characters provided is not in the alphabet and therefore
cannot be processed. If you need to use this character, initialise a
new OneTimePad
with the new_with_alphabet
function.
Trait Implementations§
source§impl Debug for OneTimePadError
impl Debug for OneTimePadError
Auto Trait Implementations§
impl RefUnwindSafe for OneTimePadError
impl Send for OneTimePadError
impl Sync for OneTimePadError
impl Unpin for OneTimePadError
impl UnwindSafe for OneTimePadError
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