Skip to main content

EncryptionOptions

Struct EncryptionOptions 

Source
pub struct EncryptionOptions<'a> {
    pub password: Option<&'a String>,
    pub keep_original_name: bool,
    pub generate_padding: bool,
    pub encrypt_metadata: bool,
    pub output_paths: Option<VecDeque<PathBuf>>,
}

Fields§

§password: Option<&'a String>

Pre-supplied password for authentication

§keep_original_name: bool

Don’t replace the name with a random UUID for the encrypted file

§generate_padding: bool

Generate random padding bytes and append them to the file. If set to false, can save some disk space for the file

§encrypt_metadata: bool

Whether to encrypt original file metadata like file name, extension, modify time, etc. Enabling this feature provides better data protection, but the file will be unable to parse from the outside without properly decrypting (e.g. encrypted file search by its original name will be unavailable)

§output_paths: Option<VecDeque<PathBuf>>

Contains an output path for each file

Trait Implementations§

Source§

impl Default for EncryptionOptions<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for EncryptionOptions<'a>

§

impl<'a> RefUnwindSafe for EncryptionOptions<'a>

§

impl<'a> Send for EncryptionOptions<'a>

§

impl<'a> Sync for EncryptionOptions<'a>

§

impl<'a> Unpin for EncryptionOptions<'a>

§

impl<'a> UnsafeUnpin for EncryptionOptions<'a>

§

impl<'a> UnwindSafe for EncryptionOptions<'a>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V