Struct Info

Source
pub struct Info<B: Backend> {
    pub backend: B::Info,
    pub revision: u32,
    pub cipher: Cipher,
    pub kdf: Kdf,
    pub bsize_gross: u32,
    pub bsize_net: u32,
}
Expand description

Information from the container.

Fields§

§backend: B::Info

Information from the lower backend.

§revision: u32

The revision of the header.

§cipher: Cipher

The cipher used for encryption.

§kdf: Kdf

The key derivation function.

§bsize_gross: u32

The gross block size is the block size specified by the backend.

This is the actual size of a block in the backend. Note that the number of userdata bytes per block can be smaller! This is the net block size (Info::bsize_net).

§bsize_net: u32

The (net) block size of the container.

The net block size is the number of bytes you can store in a block. It can be less than the gross block size (Info::bsize_gross).

Depending on the selected cipher, you need to store additional data in a block. I.e. an AE-cipher results into a tag, which needs to be stored additionally. Such data must be substracted from the gross block size and results into the net block size.

Trait Implementations§

Source§

impl<B: Debug + Backend> Debug for Info<B>
where B::Info: Debug,

Source§

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

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

impl<B: PartialEq + Backend> PartialEq for Info<B>
where B::Info: PartialEq,

Source§

fn eq(&self, other: &Info<B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B: Backend> StructuralPartialEq for Info<B>

Auto Trait Implementations§

§

impl<B> Freeze for Info<B>
where <B as Backend>::Info: Freeze,

§

impl<B> RefUnwindSafe for Info<B>
where <B as Backend>::Info: RefUnwindSafe,

§

impl<B> Send for Info<B>
where <B as Backend>::Info: Send,

§

impl<B> Sync for Info<B>
where <B as Backend>::Info: Sync,

§

impl<B> Unpin for Info<B>
where <B as Backend>::Info: Unpin,

§

impl<B> UnwindSafe for Info<B>
where <B as Backend>::Info: 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.