Struct imagevault::Client [−][src]
pub struct Client<T: Authentication> { pub client_identity: String, pub client_secret: String, pub authentication: Option<Arc<Mutex<T>>>, pub reqwest_client: ReqwestClient, pub base_url: Url, }
Expand description
Fields
client_identity: String
client_secret: String
authentication: Option<Arc<Mutex<T>>>
reqwest_client: ReqwestClient
base_url: Url
Implementations
Creates a new Client
Arguments
client_identity
- The client identityclient_secret
- The client secretbase_url
- The base URL to ImageVault, e.g.https://myimagevault.se
Adds authentication to the Client
Arguments
authentication
- TheAuthentication
to use
Remarks
Pretty much everything in the ImageVault API requires authentication, so this should be included most of the time.
Examples
use imagevault::{ Client, authentication::ClientCredentialsAuthentication }; let authentication = ClientCredentialsAuthentication::default(); let client = Client::new( "identity", "secret", "https://myimagevault.local" )? .with_authentication(authentication);
Auto Trait Implementations
impl<T> !RefUnwindSafe for Client<T>
impl<T> !UnwindSafe for Client<T>