[][src]Struct subtle_encoding::identity::Identity

pub struct Identity {}

Encoding which does not transform data and returns the original input.

Trait Implementations

impl Encoding for Identity[src]

Important traits for Vec<u8>
fn encode<B: AsRef<[u8]>>(&self, bytes: B) -> Vec<u8>[src]

Encode the given buffer, returning a Vec<u8>

fn encode_to_string<B: AsRef<[u8]>>(&self, bytes: B) -> Result<String, Error>[src]

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]

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]

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]

Decode the given buffer, returning a Vec<u8>

fn decode_from_str<S: AsRef<str>>(&self, encoded: S) -> Result<Vec<u8>, Error>[src]

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]

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]

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

impl PartialEq<Identity> for Identity[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Eq for Identity[src]

impl Ord for Identity[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<Identity> for Identity[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for Identity[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Identity[src]

impl Copy for Identity[src]

impl Clone for Identity[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Identity[src]

Auto Trait Implementations

impl Send for Identity

impl Sync for Identity

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.