Function imagevault::service::vault_service::delete [−][src]
pub async fn delete<T: Authentication + Sync>(
client: &Client<T>,
vault_id: i64
) -> Result<(), ImageVaultError>
Expand description
Calls vaultservice/delete
.
Returns an AuthenticationMissing
error
if the Client
does not have any Authentication
set.
Arguments
client
- The ImageVaultClient
to use.vault_id
- The vault ID to delete.
Examples
use std::path::Path; use imagevault::{ service::vault_service, Client, authentication::ClientCredentialsAuthentication }; let authentication = ClientCredentialsAuthentication::default(); let client = Client::new( "identity", "secret", "https://myimagevault.local" )? .with_authentication(authentication); // Delete vault with ID 42 let delete_result = vault_service::delete(&client, 42).await?;