pub enum EncryptionOption {
AES128,
RC4,
Xor,
}
Expand description
Available options for specifying which algorithm to use
Variants§
AES128
AES-128 encryption, the best
RC4
RC4 encryption, pretty weak but effective enough
Xor
Exclusive Or (XOR), also weak but effective and fastest.
Trait Implementations§
Source§impl Clone for EncryptionOption
impl Clone for EncryptionOption
Source§fn clone(&self) -> EncryptionOption
fn clone(&self) -> EncryptionOption
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EncryptionOption
impl Debug for EncryptionOption
Source§impl Display for EncryptionOption
impl Display for EncryptionOption
Source§impl From<EncryptionOption> for FileEncryption
impl From<EncryptionOption> for FileEncryption
Source§fn from(option: EncryptionOption) -> Self
fn from(option: EncryptionOption) -> Self
Converts to this type from the input type.
Source§impl<'a> FromSql<'a> for EncryptionOption
impl<'a> FromSql<'a> for EncryptionOption
Source§fn from_sql(
_type: &Type,
buf: &'a [u8],
) -> Result<EncryptionOption, Box<dyn Error + Sync + Send>>
fn from_sql( _type: &Type, buf: &'a [u8], ) -> Result<EncryptionOption, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moreSource§fn accepts(type_: &Type) -> bool
fn accepts(type_: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
.Source§impl Hash for EncryptionOption
impl Hash for EncryptionOption
Source§impl PartialEq for EncryptionOption
impl PartialEq for EncryptionOption
Source§impl ToSql for EncryptionOption
impl ToSql for EncryptionOption
Source§fn to_sql(
&self,
_type: &Type,
buf: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql( &self, _type: &Type, buf: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self
into the binary format of the specified
Postgres Type
, appending it to out
. Read moreSource§fn accepts(type_: &Type) -> bool
fn accepts(type_: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type
.Source§fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
Source§fn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
Source§impl TryFrom<&str> for EncryptionOption
impl TryFrom<&str> for EncryptionOption
Source§impl ValueEnum for EncryptionOption
impl ValueEnum for EncryptionOption
impl Copy for EncryptionOption
impl Eq for EncryptionOption
impl StructuralPartialEq for EncryptionOption
Auto Trait Implementations§
impl Freeze for EncryptionOption
impl RefUnwindSafe for EncryptionOption
impl Send for EncryptionOption
impl Sync for EncryptionOption
impl Unpin for EncryptionOption
impl UnwindSafe for EncryptionOption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
Source§fn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self
as a ToSql
trait object.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.