Struct subtle_encoding::identity::Identity [−][src]
pub struct Identity {}Encoding which does not transform data and returns the original input.
Trait Implementations
impl Copy for Identity[src]
impl Copy for Identityimpl Clone for Identity[src]
impl Clone for Identityfn clone(&self) -> Identity[src]
fn clone(&self) -> IdentityReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for Identity[src]
impl Debug for Identityfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for Identity[src]
impl Default for Identityimpl Eq for Identity[src]
impl Eq for Identityimpl Hash for Identity[src]
impl Hash for Identityfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for Identity[src]
impl PartialEq for Identityfn eq(&self, other: &Identity) -> bool[src]
fn eq(&self, other: &Identity) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialOrd for Identity[src]
impl PartialOrd for Identityfn partial_cmp(&self, other: &Identity) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Identity) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0[src]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for Identity[src]
impl Ord for Identityfn cmp(&self, other: &Identity) -> Ordering[src]
fn cmp(&self, other: &Identity) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Encoding for Identity[src]
impl Encoding for Identityfn encode_to_slice(&self, src: &[u8], dst: &mut [u8]) -> Result<usize, Error>[src]
fn encode_to_slice(&self, src: &[u8], dst: &mut [u8]) -> Result<usize, Error>Encode the given slice into the destination buffer. Read more
fn encoded_len(&self, bytes: &[u8]) -> usize[src]
fn encoded_len(&self, bytes: &[u8]) -> usizeCalculate the length of the given data after encoding.
fn decode_to_slice(&self, src: &[u8], dst: &mut [u8]) -> Result<usize, Error>[src]
fn decode_to_slice(&self, src: &[u8], dst: &mut [u8]) -> Result<usize, Error>Decode hexadecimal (upper or lower case) with branchless / secret-independent logic
fn decoded_len(&self, bytes: &[u8]) -> Result<usize, Error>[src]
fn decoded_len(&self, bytes: &[u8]) -> Result<usize, Error>Calculate the length of the given data after decoding.
fn encode<B: AsRef<[u8]>>(&self, bytes: B) -> Vec<u8>[src]
fn encode<B: AsRef<[u8]>>(&self, bytes: B) -> Vec<u8>Encode the given buffer, returning a Vec<u8>
fn encode_to_string<B: AsRef<[u8]>>(&self, bytes: B) -> Result<String, Error>[src]
fn encode_to_string<B: AsRef<[u8]>>(&self, bytes: B) -> Result<String, Error>Encode the given slice to a String with this Encoding. Read more
fn encode_to_writer<B, W>(
&self,
bytes: B,
writer: &mut W
) -> Result<usize, Error> where
B: AsRef<[u8]>,
W: Write, [src]
fn encode_to_writer<B, W>(
&self,
bytes: B,
writer: &mut W
) -> Result<usize, Error> where
B: AsRef<[u8]>,
W: Write, Encode the given slice with this Encoding, writing the result to the supplied io::Write type, returning the number of bytes written or a Error. Read more
fn encode_to_file<B, P>(&self, bytes: B, path: P) -> Result<File, Error> where
B: AsRef<[u8]>,
P: AsRef<Path>, [src]
fn encode_to_file<B, P>(&self, bytes: B, path: P) -> Result<File, Error> where
B: AsRef<[u8]>,
P: AsRef<Path>, Encode self and write it to a file at the given path, returning the resulting File or a Error. Read more
fn decode<B: AsRef<[u8]>>(&self, encoded_bytes: B) -> Result<Vec<u8>, Error>[src]
fn decode<B: AsRef<[u8]>>(&self, encoded_bytes: B) -> Result<Vec<u8>, Error>Decode the given buffer, returning a Vec<u8>
fn decode_from_str<S: AsRef<str>>(&self, encoded: S) -> Result<Vec<u8>, Error>[src]
fn decode_from_str<S: AsRef<str>>(&self, encoded: S) -> Result<Vec<u8>, Error>Decode the given string-alike type with this Encoding, returning the decoded value or a Error. Read more
fn decode_from_reader<R: Read>(&self, reader: &mut R) -> Result<Vec<u8>, Error>[src]
fn decode_from_reader<R: Read>(&self, reader: &mut R) -> Result<Vec<u8>, Error>Decode the data read from the given io::Read type with this Encoding, returning the decoded value or a Error. Read more
fn decode_from_file<P: AsRef<Path>>(&self, path: P) -> Result<Vec<u8>, Error>[src]
fn decode_from_file<P: AsRef<Path>>(&self, path: P) -> Result<Vec<u8>, Error>Read a file at the given path, decoding the data it contains using the provided Encoding, returning the decoded value or a Error. Read more