pub struct CrackResult {
pub success: bool,
pub encrypted_text: String,
pub unencrypted_text: Option<Vec<String>>,
pub decoder: &'static str,
pub checker_name: &'static str,
pub checker_description: &'static str,
pub key: Option<&'static str>,
pub description: &'static str,
pub link: &'static str,
}
Expand description
Every cracker returns this object which Either indicates success or failure among other things.
Fields§
§success: bool
If our checkers return success, we change this bool to True
encrypted_text: String
Encrypted text is the text before we decrypt it.
unencrypted_text: Option<Vec<String>>
Unencrypted text is what it looks like after. if decoder failed, this will be None
decoder: &'static str
Decoder is the function we used to decode the text
checker_name: &'static str
Checker which identified the text
checker_description: &'static str
Description is a short description of the checker
key: Option<&'static str>
Key is optional as decoders do not use keys.
description: &'static str
Description is a short description of the decoder
link: &'static str
Link is a link to more info about the decoder
Implementations§
Source§impl CrackResult
impl CrackResult
Sourcepub fn new<T>(decoder_used: &Decoder<T>, text: String) -> Self
pub fn new<T>(decoder_used: &Decoder<T>, text: String) -> Self
This function returns a new CrackResult
Sourcepub fn update_checker(&mut self, checker_result: &CheckResult)
pub fn update_checker(&mut self, checker_result: &CheckResult)
Updates the checker information
Trait Implementations§
Source§impl Clone for CrackResult
impl Clone for CrackResult
Source§fn clone(&self) -> CrackResult
fn clone(&self) -> CrackResult
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CrackResult
impl RefUnwindSafe for CrackResult
impl Send for CrackResult
impl Sync for CrackResult
impl Unpin for CrackResult
impl UnwindSafe for CrackResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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