pub struct ApplicationKeyring { /* private fields */ }
Expand description
Application keyring.
Keyring is what makes you possible to register, update and manage your application’s AuthN/AuthZ account.
Implementations§
Source§impl ApplicationKeyring
impl ApplicationKeyring
Sourcepub fn from_file(filepath: impl AsRef<Path>) -> MResult<Self>
pub fn from_file(filepath: impl AsRef<Path>) -> MResult<Self>
Reads an application keyring, if persisted.
Sourcepub fn save(&self, filepath: impl AsRef<Path>) -> MResult<()>
pub fn save(&self, filepath: impl AsRef<Path>) -> MResult<()>
Reads an application keyring, if persisted.
Sourcepub fn has_keypair(&self) -> bool
pub fn has_keypair(&self) -> bool
Returns if keyring has the keypair.
Sourcepub fn keypair(&self) -> MResult<SignKeypair>
pub fn keypair(&self) -> MResult<SignKeypair>
Returns application keypair.
Sourcepub fn new_keypair(&mut self) -> MResult<SignKeypair>
pub fn new_keypair(&mut self) -> MResult<SignKeypair>
Generates a new keypair.
Sourcepub fn switch_to_keypair(&mut self, keypair: &SignKeypair)
pub fn switch_to_keypair(&mut self, keypair: &SignKeypair)
Switches to given keypair.
Sourcepub fn has_invite(&self) -> bool
pub fn has_invite(&self) -> bool
Returns if keyring has an invitation code.
Sourcepub fn enter_invite(&mut self, invite: &Invite)
pub fn enter_invite(&mut self, invite: &Invite)
Switches to given keypair.
Trait Implementations§
Source§impl Clone for ApplicationKeyring
impl Clone for ApplicationKeyring
Source§fn clone(&self) -> ApplicationKeyring
fn clone(&self) -> ApplicationKeyring
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<'de> Deserialize<'de> for ApplicationKeyring
impl<'de> Deserialize<'de> for ApplicationKeyring
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 ApplicationKeyring
impl RefUnwindSafe for ApplicationKeyring
impl Send for ApplicationKeyring
impl Sync for ApplicationKeyring
impl Unpin for ApplicationKeyring
impl UnwindSafe for ApplicationKeyring
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