CrypterErrorCodeEnum

Enum CrypterErrorCodeEnum 

Source
pub enum CrypterErrorCodeEnum {
Show 15 variants CipherAlgorithmError = 13_100, CipherAlgorithmUnsatisfiedIVLength = 13101, CipherAlgorithmUnsatisfiedKeyLength = 13102, StreamGeneratorError = 13_200, FailedWhenCrypting = 13201, FailedWhenFinalizingCryption = 13202, FailedWhenFlushingBuffer = 13203, StreamCrypterError = 13_300, CurrentIndexNotAtTheEndOfBufferWhenFlushing = 13301, StringCrypterError = 13_400, FailedWhenCheckingCrc32ValueOfDecryptedContent = 13401, FailedWhenEncodingString = 13402, FailedWhenDecodingString = 13403, CannotDoCryptionToEmptyString = 13404, PasswordCannotBeEmpty = 13405,
}

Variants§

§

CipherAlgorithmError = 13_100

密码算法错误段

§

CipherAlgorithmUnsatisfiedIVLength = 13101

不满足要求的IV长度

§

CipherAlgorithmUnsatisfiedKeyLength = 13102

不满足要求的Key长度

§

StreamGeneratorError = 13_200

流生成器错误段

§

FailedWhenCrypting = 13201

执行密码操作时失败

§

FailedWhenFinalizingCryption = 13202

完成密码操作时失败

§

FailedWhenFlushingBuffer = 13203

刷新缓冲区时失败

§

StreamCrypterError = 13_300

流加密器错误段

§

CurrentIndexNotAtTheEndOfBufferWhenFlushing = 13301

刷新时当前下标不在缓冲区的最后

§

StringCrypterError = 13_400

字符串加密器错误段

§

FailedWhenCheckingCrc32ValueOfDecryptedContent = 13401

解密后内容无法通过校验

§

FailedWhenEncodingString = 13402

字符串编码时失败

§

FailedWhenDecodingString = 13403

字符串解码时失败

§

CannotDoCryptionToEmptyString = 13404

不能对空串进行密码操作

§

PasswordCannotBeEmpty = 13405

密码不能为空

Trait Implementations§

Source§

impl FromPrimitive for CrypterErrorCodeEnum

Source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Auto Trait Implementations§

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> 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