pub enum AuthPlugin<'a> {
MysqlOldPassword,
MysqlClearPassword,
MysqlNativePassword,
CachingSha2Password,
Ed25519,
Other(Cow<'a, [u8]>),
}Expand description
Authentication plugin
Variants§
MysqlOldPassword
Old Password Authentication
MysqlClearPassword
Client-Side Cleartext Pluggable Authentication
MysqlNativePassword
Legacy authentication plugin
CachingSha2Password
Default since MySql v8.0.4
Ed25519
MariaDB’s Ed25519 based authentication
This plugin is known to the library but the actual support is enabled
by the client_ed25519 feature.
Other(Cow<'a, [u8]>)
Implementations§
Source§impl<'a> AuthPlugin<'a>
impl<'a> AuthPlugin<'a>
pub fn from_bytes(name: &'a [u8]) -> AuthPlugin<'a>
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn into_owned(self) -> AuthPlugin<'static>
pub fn borrow(&self) -> AuthPlugin<'_>
Sourcepub fn gen_data<'b>(
&self,
pass: Option<&'b str>,
nonce: &[u8],
) -> Option<AuthPluginData<'b>>
pub fn gen_data<'b>( &self, pass: Option<&'b str>, nonce: &[u8], ) -> Option<AuthPluginData<'b>>
Generates auth plugin data for this plugin.
It’ll generate None if password is None or empty.
Note, that you should trim terminating null character from the nonce.
§Panic
AuthPlugin::Ed25519will panic ifclient_ed25519feature is disabled.
Trait Implementations§
Source§impl<'a> Clone for AuthPlugin<'a>
impl<'a> Clone for AuthPlugin<'a>
Source§fn clone(&self) -> AuthPlugin<'a>
fn clone(&self) -> AuthPlugin<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for AuthPlugin<'a>
impl<'a> Debug for AuthPlugin<'a>
Source§impl<'a> Hash for AuthPlugin<'a>
impl<'a> Hash for AuthPlugin<'a>
Source§impl<'de> MyDeserialize<'de> for AuthPlugin<'de>
impl<'de> MyDeserialize<'de> for AuthPlugin<'de>
Source§impl MySerialize for AuthPlugin<'_>
impl MySerialize for AuthPlugin<'_>
Source§impl<'a> PartialEq for AuthPlugin<'a>
impl<'a> PartialEq for AuthPlugin<'a>
impl<'a> Eq for AuthPlugin<'a>
impl<'a> StructuralPartialEq for AuthPlugin<'a>
Auto Trait Implementations§
impl<'a> Freeze for AuthPlugin<'a>
impl<'a> RefUnwindSafe for AuthPlugin<'a>
impl<'a> Send for AuthPlugin<'a>
impl<'a> Sync for AuthPlugin<'a>
impl<'a> Unpin for AuthPlugin<'a>
impl<'a> UnwindSafe for AuthPlugin<'a>
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