pub enum CredentialKind {
SshPassword,
SshKeyPassphrase,
SftpPassword,
SftpKeyPassphrase,
FtpPassword,
PostgresPassword,
}Expand description
Kinds of credential we persist. Serialised in snake_case on the wire so the
frontend can emit e.g. {"kind": "ssh_password"}.
Each variant maps to a fixed Keychain service string prefixed with
com.r-shell. so the entries are easy to identify in Keychain Access.app
and distinct from credentials stored by other applications.
Variants§
Implementations§
Source§impl CredentialKind
impl CredentialKind
Sourcepub fn service(self) -> &'static str
pub fn service(self) -> &'static str
The Keychain kSecAttrService string associated with this kind.
Sourcepub fn friendly_label(self) -> &'static str
pub fn friendly_label(self) -> &'static str
Short human label used in Keychain Access.app when a credential is first saved. Paired with the account string to form the full entry name the user sees.
Trait Implementations§
Source§impl Clone for CredentialKind
impl Clone for CredentialKind
Source§fn clone(&self) -> CredentialKind
fn clone(&self) -> CredentialKind
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 moreimpl Copy for CredentialKind
Source§impl Debug for CredentialKind
impl Debug for CredentialKind
Source§impl<'de> Deserialize<'de> for CredentialKind
impl<'de> Deserialize<'de> for CredentialKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CredentialKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CredentialKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CredentialKind
Source§impl PartialEq for CredentialKind
impl PartialEq for CredentialKind
Source§fn eq(&self, other: &CredentialKind) -> bool
fn eq(&self, other: &CredentialKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CredentialKind
impl Serialize for CredentialKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CredentialKind
Auto Trait Implementations§
impl Freeze for CredentialKind
impl RefUnwindSafe for CredentialKind
impl Send for CredentialKind
impl Sync for CredentialKind
impl Unpin for CredentialKind
impl UnsafeUnpin for CredentialKind
impl UnwindSafe for CredentialKind
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