[−][src]Struct imagevault::Client
Client
A client that is used to consume the ImageVault API.
Remarks
The client saves and mutates the authentication, so it is recommended to re-use the client as much as possible in order to minimize the need to re-authenticate.
Methods
impl<T: Authentication> Client<T>
[src]
pub async fn assets_info<'_>(&'_ mut self) -> Result<InfoResult, Box<dyn Error>>
[src]
impl<T: Authentication> Client<T>
[src]
pub async fn info_version<'_>(
&'_ mut self
) -> Result<VersionResult, Box<dyn Error>>
[src]
&'_ mut self
) -> Result<VersionResult, Box<dyn Error>>
impl<T: Authentication> Client<T>
[src]
pub fn new(
client_identity: &str,
client_secret: &str,
base_url: &str
) -> Result<Self, Box<dyn Error>>
[src]
client_identity: &str,
client_secret: &str,
base_url: &str
) -> Result<Self, Box<dyn Error>>
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
pub fn with_authentication(self, authentication: T) -> Self
[src]
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::new(); let client = Client::new( "identity", "secret", "https://myimagevault.local") .unwrap() .with_authentication(authentication);
Auto Trait Implementations
impl<T> !RefUnwindSafe for Client<T>
impl<T> Send for Client<T> where
T: Send,
T: Send,
impl<T> Sync for Client<T> where
T: Send,
T: Send,
impl<T> Unpin for Client<T>
impl<T> !UnwindSafe for Client<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,