pub struct Credential { /* private fields */ }Expand description
Groups information used for user authentication.
GLib type: Boxed type with copy-on-clone semantics.
Implementations§
Source§impl Credential
impl Credential
Sourcepub fn as_ptr(&self) -> *mut WebKitCredential
pub fn as_ptr(&self) -> *mut WebKitCredential
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut WebKitCredential) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut WebKitCredential) -> &Self
Borrows the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow_mut(
ptr: &mut *mut WebKitCredential,
) -> &mut Self
pub unsafe fn from_glib_ptr_borrow_mut( ptr: &mut *mut WebKitCredential, ) -> &mut Self
Borrows the underlying C value mutably.
Source§impl Credential
impl Credential
Sourcepub fn new(
username: &str,
password: &str,
persistence: CredentialPersistence,
) -> Credential
pub fn new( username: &str, password: &str, persistence: CredentialPersistence, ) -> Credential
Create a new credential from the provided username, password and persistence mode.
§username
The username for the new credential
§password
The password for the new credential
§persistence
The CredentialPersistence of the new credential
§Returns
A Credential.
Sourcepub fn for_certificate(
certificate: Option<&impl IsA<TlsCertificate>>,
persistence: CredentialPersistence,
) -> Credential
pub fn for_certificate( certificate: Option<&impl IsA<TlsCertificate>>, persistence: CredentialPersistence, ) -> Credential
Create a new credential from the certificate and persistence mode.
Note that CredentialPersistence::Permanent is not supported for certificate credentials.
§certificate
The gio::TlsCertificate, or None
§persistence
The CredentialPersistence of the new credential
§Returns
A Credential.
Sourcepub fn for_certificate_pin(
pin: &str,
persistence: CredentialPersistence,
) -> Credential
pub fn for_certificate_pin( pin: &str, persistence: CredentialPersistence, ) -> Credential
Create a new credential from the provided PIN and persistence mode.
Note that CredentialPersistence::Permanent is not supported for certificate pin credentials.
§pin
The PIN for the new credential
§persistence
The CredentialPersistence of the new credential
§Returns
A Credential.
Sourcepub fn certificate(&mut self) -> Option<TlsCertificate>
pub fn certificate(&mut self) -> Option<TlsCertificate>
Sourcepub fn persistence(&mut self) -> CredentialPersistence
pub fn persistence(&mut self) -> CredentialPersistence
Get the persistence mode currently held by this Credential.
§Returns
The CredentialPersistence stored in the Credential.
Trait Implementations§
Source§impl Clone for Credential
impl Clone for Credential
Source§impl Debug for Credential
impl Debug for Credential
Source§impl From<Credential> for Value
impl From<Credential> for Value
Source§fn from(o: Credential) -> Self
fn from(o: Credential) -> Self
Source§impl HasParamSpec for Credential
impl HasParamSpec for Credential
type ParamSpec = ParamSpecBoxed
Source§type SetValue = Credential
type SetValue = Credential
type BuilderFn = fn(&str) -> ParamSpecBoxedBuilder<'_, Credential>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for Credential
impl Hash for Credential
Source§impl Ord for Credential
impl Ord for Credential
Source§fn cmp(&self, other: &Credential) -> Ordering
fn cmp(&self, other: &Credential) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Credential
impl PartialEq for Credential
Source§impl PartialOrd for Credential
impl PartialOrd for Credential
Source§impl StaticType for Credential
impl StaticType for Credential
Source§fn static_type() -> Type
fn static_type() -> Type
Self.