pub struct Decoder<Type> {
pub name: &'static str,
pub description: &'static str,
pub link: &'static str,
pub tags: Vec<&'static str>,
pub popularity: f32,
pub phantom: PhantomData<Type>,
}
Expand description
! The Interface defines what the struct for each decoder looks like
Fields§
§name: &'static str
The English name of the decoder.
description: &'static str
A description, you can take the first line from Wikipedia Sometimes our decoders do not exist on Wikipedia so we write our own.
link: &'static str
Wikipedia Link
The tags it has. See other decoders. Think of it as a “category” This is used to filter decoders. For example, if you want to filter decoders that are “base64” you would use the tag “base64” or “base”. You can also add tags like “online” to filter decoders that are online.
popularity: f32
We get popularity by eye-balling it or using the API’s data
phantom: PhantomData<Type>
we don’t use the Type, so we use PhantomData to mark it!
Trait Implementations§
Source§impl Crack for Decoder<AtbashDecoder>
impl Crack for Decoder<AtbashDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<AtbashDecoder>
fn new() -> Decoder<AtbashDecoder>
Source§impl Crack for Decoder<Base32Decoder>
impl Crack for Decoder<Base32Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base32Decoder>
fn new() -> Decoder<Base32Decoder>
Source§impl Crack for Decoder<Base58BitcoinDecoder>
impl Crack for Decoder<Base58BitcoinDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base58BitcoinDecoder>
fn new() -> Decoder<Base58BitcoinDecoder>
Source§impl Crack for Decoder<Base58FlickrDecoder>
impl Crack for Decoder<Base58FlickrDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base58FlickrDecoder>
fn new() -> Decoder<Base58FlickrDecoder>
Source§impl Crack for Decoder<Base58MoneroDecoder>
impl Crack for Decoder<Base58MoneroDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base58MoneroDecoder>
fn new() -> Decoder<Base58MoneroDecoder>
Source§impl Crack for Decoder<Base58RippleDecoder>
impl Crack for Decoder<Base58RippleDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base58RippleDecoder>
fn new() -> Decoder<Base58RippleDecoder>
Source§impl Crack for Decoder<Base64Decoder>
impl Crack for Decoder<Base64Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base64Decoder>
fn new() -> Decoder<Base64Decoder>
Source§impl Crack for Decoder<Base64URLDecoder>
impl Crack for Decoder<Base64URLDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base64URLDecoder>
fn new() -> Decoder<Base64URLDecoder>
Source§impl Crack for Decoder<Base65536Decoder>
impl Crack for Decoder<Base65536Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base65536Decoder>
fn new() -> Decoder<Base65536Decoder>
Source§impl Crack for Decoder<Base91Decoder>
impl Crack for Decoder<Base91Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base91Decoder>
fn new() -> Decoder<Base91Decoder>
Source§impl Crack for Decoder<BinaryDecoder>
impl Crack for Decoder<BinaryDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<BinaryDecoder>
fn new() -> Decoder<BinaryDecoder>
Source§impl Crack for Decoder<CaesarDecoder>
impl Crack for Decoder<CaesarDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<CaesarDecoder>
fn new() -> Decoder<CaesarDecoder>
Source§impl Crack for Decoder<CitrixCTX1Decoder>
impl Crack for Decoder<CitrixCTX1Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<CitrixCTX1Decoder>
fn new() -> Decoder<CitrixCTX1Decoder>
Source§impl Crack for Decoder<HexadecimalDecoder>
impl Crack for Decoder<HexadecimalDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<HexadecimalDecoder>
fn new() -> Decoder<HexadecimalDecoder>
Source§impl Crack for Decoder<MorseCodeDecoder>
impl Crack for Decoder<MorseCodeDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<MorseCodeDecoder>
fn new() -> Decoder<MorseCodeDecoder>
Source§impl Crack for Decoder<ReverseDecoder>
impl Crack for Decoder<ReverseDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<ReverseDecoder>
fn new() -> Decoder<ReverseDecoder>
Auto Trait Implementations§
impl<Type> Freeze for Decoder<Type>
impl<Type> RefUnwindSafe for Decoder<Type>where
Type: RefUnwindSafe,
impl<Type> Send for Decoder<Type>where
Type: Send,
impl<Type> Sync for Decoder<Type>where
Type: Sync,
impl<Type> Unpin for Decoder<Type>where
Type: Unpin,
impl<Type> UnwindSafe for Decoder<Type>where
Type: UnwindSafe,
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
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>
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>
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