pub enum PgAuthMethod {
Password {
password: String,
},
Keychain {
account: String,
},
}Expand description
How to authenticate to the Postgres server.
Keychain defers credential lookup to the macOS keychain at connect time;
this matches the SSH/SFTP pattern and keeps secrets out of memory until
they are actually required.
Variants§
Password
Plaintext password supplied directly. Use only for ephemeral test
connections; production callers should prefer Keychain.
Keychain
Resolve the password from the macOS keychain at connect time, using
the supplied account identifier (e.g. "postgres:profile-id").
Trait Implementations§
Source§impl Clone for PgAuthMethod
impl Clone for PgAuthMethod
Source§fn clone(&self) -> PgAuthMethod
fn clone(&self) -> PgAuthMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PgAuthMethod
impl Debug for PgAuthMethod
Source§impl<'de> Deserialize<'de> for PgAuthMethod
impl<'de> Deserialize<'de> for PgAuthMethod
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PgAuthMethod
impl RefUnwindSafe for PgAuthMethod
impl Send for PgAuthMethod
impl Sync for PgAuthMethod
impl Unpin for PgAuthMethod
impl UnsafeUnpin for PgAuthMethod
impl UnwindSafe for PgAuthMethod
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