Enum vpb::encrypt::EncryptionAlgorithm
source · [−]#[repr(i32)]
pub enum EncryptionAlgorithm {
None,
Aes,
}
Variants
None
Aes
Implementations
sourceimpl EncryptionAlgorithm
impl EncryptionAlgorithm
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Trait Implementations
sourceimpl Clone for EncryptionAlgorithm
impl Clone for EncryptionAlgorithm
sourcefn clone(&self) -> EncryptionAlgorithm
fn clone(&self) -> EncryptionAlgorithm
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EncryptionAlgorithm
impl Debug for EncryptionAlgorithm
sourceimpl Default for EncryptionAlgorithm
impl Default for EncryptionAlgorithm
sourcefn default() -> EncryptionAlgorithm
fn default() -> EncryptionAlgorithm
Returns the “default value” for a type. Read more
sourceimpl From<EncryptionAlgorithm> for i32
impl From<EncryptionAlgorithm> for i32
sourcefn from(value: EncryptionAlgorithm) -> i32
fn from(value: EncryptionAlgorithm) -> i32
Converts to this type from the input type.
sourceimpl From<i128> for EncryptionAlgorithm
impl From<i128> for EncryptionAlgorithm
sourcefn from(val: i128) -> EncryptionAlgorithm
fn from(val: i128) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<i16> for EncryptionAlgorithm
impl From<i16> for EncryptionAlgorithm
sourcefn from(val: i16) -> EncryptionAlgorithm
fn from(val: i16) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<i32> for EncryptionAlgorithm
impl From<i32> for EncryptionAlgorithm
sourcefn from(val: i32) -> EncryptionAlgorithm
fn from(val: i32) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<i64> for EncryptionAlgorithm
impl From<i64> for EncryptionAlgorithm
sourcefn from(val: i64) -> EncryptionAlgorithm
fn from(val: i64) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<i8> for EncryptionAlgorithm
impl From<i8> for EncryptionAlgorithm
sourcefn from(val: i8) -> EncryptionAlgorithm
fn from(val: i8) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<isize> for EncryptionAlgorithm
impl From<isize> for EncryptionAlgorithm
sourcefn from(val: isize) -> EncryptionAlgorithm
fn from(val: isize) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<u128> for EncryptionAlgorithm
impl From<u128> for EncryptionAlgorithm
sourcefn from(val: u128) -> EncryptionAlgorithm
fn from(val: u128) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<u16> for EncryptionAlgorithm
impl From<u16> for EncryptionAlgorithm
sourcefn from(val: u16) -> EncryptionAlgorithm
fn from(val: u16) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<u32> for EncryptionAlgorithm
impl From<u32> for EncryptionAlgorithm
sourcefn from(val: u32) -> EncryptionAlgorithm
fn from(val: u32) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<u64> for EncryptionAlgorithm
impl From<u64> for EncryptionAlgorithm
sourcefn from(val: u64) -> EncryptionAlgorithm
fn from(val: u64) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<u8> for EncryptionAlgorithm
impl From<u8> for EncryptionAlgorithm
sourcefn from(val: u8) -> EncryptionAlgorithm
fn from(val: u8) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl From<usize> for EncryptionAlgorithm
impl From<usize> for EncryptionAlgorithm
sourcefn from(val: usize) -> EncryptionAlgorithm
fn from(val: usize) -> EncryptionAlgorithm
Converts to this type from the input type.
sourceimpl Hash for EncryptionAlgorithm
impl Hash for EncryptionAlgorithm
sourceimpl Ord for EncryptionAlgorithm
impl Ord for EncryptionAlgorithm
sourcefn cmp(&self, other: &EncryptionAlgorithm) -> Ordering
fn cmp(&self, other: &EncryptionAlgorithm) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<EncryptionAlgorithm> for EncryptionAlgorithm
impl PartialEq<EncryptionAlgorithm> for EncryptionAlgorithm
sourcefn eq(&self, other: &EncryptionAlgorithm) -> bool
fn eq(&self, other: &EncryptionAlgorithm) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<EncryptionAlgorithm> for EncryptionAlgorithm
impl PartialOrd<EncryptionAlgorithm> for EncryptionAlgorithm
sourcefn partial_cmp(&self, other: &EncryptionAlgorithm) -> Option<Ordering>
fn partial_cmp(&self, other: &EncryptionAlgorithm) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for EncryptionAlgorithm
impl Eq for EncryptionAlgorithm
impl StructuralEq for EncryptionAlgorithm
impl StructuralPartialEq for EncryptionAlgorithm
Auto Trait Implementations
impl RefUnwindSafe for EncryptionAlgorithm
impl Send for EncryptionAlgorithm
impl Sync for EncryptionAlgorithm
impl Unpin for EncryptionAlgorithm
impl UnwindSafe for EncryptionAlgorithm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Checksumer for T
impl<T> Checksumer for T
sourcefn checksum(&self, algorithm: ChecksumAlgorithm) -> Checksumwhere
Self: AsRef<[u8]>,
fn checksum(&self, algorithm: ChecksumAlgorithm) -> Checksumwhere
Self: AsRef<[u8]>,
Calculates checksum of data
.
sourcefn verify_checksum(&self, expected: u64, algo: ChecksumAlgorithm) -> boolwhere
Self: AsRef<[u8]>,
fn verify_checksum(&self, expected: u64, algo: ChecksumAlgorithm) -> boolwhere
Self: AsRef<[u8]>,
Validates the checksum for the data against the given expected checksum. Return true
if the checksum is valid.
sourceimpl<T> Compressor for T
impl<T> Compressor for T
fn compress_to(&self, dst: &mut [u8], cmp: Compression) -> Result<usize, Error>where
Self: AsRef<[u8]>,
fn compress_into_vec(&self, cmp: Compression) -> Result<Vec<u8>, Error>where
Self: AsRef<[u8]>,
fn decompress_to(&self, dst: &mut [u8], cmp: Compression) -> Result<usize, Error>where
Self: AsRef<[u8]>,
fn decompress_into_vec(&self, cmp: Compression) -> Result<Vec<u8>, Error>where
Self: AsRef<[u8]>,
fn max_encoded_len(&self, cmp: Compression) -> usizewhere
Self: AsRef<[u8]>,
sourceimpl<T> Encryptor for T
impl<T> Encryptor for T
sourcefn encrypt(
&mut self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsMut<[u8]>,
fn encrypt(
&mut self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsMut<[u8]>,
Encrypts self with IV. Can be used for both encryption and decryption. Read more
sourcefn encrypt_to_vec(
&self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<Vec<u8>, EncryptError>where
Self: AsRef<[u8]>,
fn encrypt_to_vec(
&self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<Vec<u8>, EncryptError>where
Self: AsRef<[u8]>,
Encrypts self with IV to a new Vec
.
Can be used for both encryption and decryption. Read more
sourcefn encrypt_to(
&self,
dst: &mut [u8],
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsRef<[u8]>,
fn encrypt_to(
&self,
dst: &mut [u8],
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsRef<[u8]>,
Encrypts self with IV to dst
.
Can be used for both encryption and decryption. Read more