Struct locky::LockyClient
source · pub struct LockyClient { /* private fields */ }
Expand description
LockyClient is a client for interacting with the Locky service.
It provides methods for creating an account, managing credentials, creating keys, and retrieving keys. The client can be configured with different environments, such as staging or production.
Implementations§
source§impl LockyClient
impl LockyClient
pub fn new(env: LockyEnv) -> Self
pub fn with_creds<S>(self, account_id: S, access_token: S) -> Self
pub async fn create_account<S>( &mut self, email: S ) -> Result<String, Box<dyn Error>>
pub fn get_access_token(&self) -> Result<String, Box<dyn Error>>
pub async fn create_key<S>(&mut self, name: S) -> Result<(), Box<dyn Error>>
pub async fn get_key<S>( &mut self, name: S ) -> Result<Zeroizing<[u8; 32]>, Box<dyn Error>>
Auto Trait Implementations§
impl !RefUnwindSafe for LockyClient
impl Send for LockyClient
impl Sync for LockyClient
impl Unpin for LockyClient
impl !UnwindSafe for LockyClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request