Struct lesspass_client::Client [−][src]
pub struct Client {
pub host: Url,
}
Expand description
Client for connecting to LessPass server
Fields
host: Url
Implementations
Builder interface to Client
Usage:
use reqwest::Url;
use lesspass_client::Client;
let host = Url::parse("https://api.lesspass.com").unwrap();
let lpc = Client::new(host);
Creates a new user
Changes current user password
Need access token string
Create a new token (perform initial auth with username and password)
Refresh a token
Need refresh token string
Gets the password list
Need access token string
pub async fn post_password(
&self,
token: String,
password: &NewPassword
) -> Result<(), String>
pub async fn post_password(
&self,
token: String,
password: &NewPassword
) -> Result<(), String>
Creates a new password
Need access token string
pub async fn put_password(
&self,
token: String,
id: String,
password: &NewPassword
) -> Result<(), String>
pub async fn put_password(
&self,
token: String,
id: String,
password: &NewPassword
) -> Result<(), String>
Updates existing password
Need access token string
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Client
impl UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more