Struct Decrypt

Source
pub struct Decrypt<U, N>
where N: NonceSequence,
{ /* private fields */ }
Expand description

Middleware that encrypts data for transport.

This is the deserializer.

Implementations§

Source§

impl<U, N> Decrypt<U, N>
where N: NonceSequence,

Source

pub fn new(next: U, key: OpeningKey<N>) -> Decrypt<U, N>

Create a new Decrypt serializer that uses key.

Source

pub fn next_ref(&self) -> &U

Get a reference to the next serializer/deserializer in the chain.

Source

pub fn next_mut(&mut self) -> &mut U

Get a reference to the next serializer/deserializer in the chain.

Source

pub fn into_next(self) -> U

Consume self and return the next serializer/deserializer in the chain.

Trait Implementations§

Source§

impl<U, N> Debug for Decrypt<U, N>
where U: Debug, N: Debug + NonceSequence,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T, U, N> Deserializer<T> for Decrypt<U, N>
where N: NonceSequence, U: Deserializer<T>,

Source§

type Error = DeserializeError<<U as Deserializer<T>>::Error>

The error returned by Deserializer::deserialize().
Source§

fn deserialize( &mut self, buf: &mut [u8], ) -> Result<T, <Decrypt<U, N> as Deserializer<T>>::Error>

Deserialize bytes from buf to a type T. Read more

Auto Trait Implementations§

§

impl<U, N> Freeze for Decrypt<U, N>
where U: Freeze, N: Freeze,

§

impl<U, N> RefUnwindSafe for Decrypt<U, N>

§

impl<U, N> Send for Decrypt<U, N>
where U: Send, N: Send,

§

impl<U, N> Sync for Decrypt<U, N>
where U: Sync, N: Sync,

§

impl<U, N> Unpin for Decrypt<U, N>
where U: Unpin, N: Unpin,

§

impl<U, N> UnwindSafe for Decrypt<U, N>
where U: UnwindSafe, N: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.