pub async fn delete_unused_volumes(&self) -> Result<DeletedInfo, DockerError> {

        let uri = self.make_uri("/volumes/prune");
        let request = Request::post(uri)
            .body(hyper::Body::empty())
            .unwrap();

        self.execute_async(request).await
            .and_then(|response| {
                match response.status {
                    200 => Ok(json::from_str(response.body_as_string().as_str()).unwrap()),
                    400 => Err(DockerError::BadParameters(json::from_str(response.body_as_string().as_str()).unwrap())),
                    500 => Err(DockerError::ServerError(json::from_str(response.body_as_string().as_str()).unwrap())),
                    _ => Err(DockerError::UnknownStatus),
                }
            })
    }
/// Delete unused volumes
///
/// Return empty or DockerError
///
/// # Examples
///
/// ```rust
/// # use docker_client::{DockerClient, DockerError};
/// fn main() {
///    let client = DockerClient::new();
///
///     match client.delete_unused_volumes() {
///         Ok(_) => {},
///         Err(e) => { println!("Error: {:?}", e); },
///     }
///
/// }
/// ```
Delete unused volumes
Return empty or DockerError
Delete unused volumes Return empty or DockerError
pub async fn delete_unused_volumes(&self) -> Result<DeletedInfo, DockerError> {
        let uri = self.make_uri("/volumes/prune");
        let request = Request::post(uri)
            .body(hyper::Body::empty())
            .unwrap();
        self.execute_async(request).await
            .and_then(|response| {
                match response.status {
                    200 => Ok(json::from_str(response.body_as_string().as_str()).unwrap()),
                    400 => Err(DockerError::BadParameters(json::from_str(response.body_as_string().as_str()).unwrap())),
                    500 => Err(DockerError::ServerError(json::from_str(response.body_as_string().as_str()).unwrap())),
                    _ => Err(DockerError::UnknownStatus),
                }
            })
    }
pub async fn delete_unused_volumes ( & self ) -> Result < DeletedInfo , DockerError > { let uri = self . make_uri ( " " ) ; let request = Request :: post ( uri ) . body ( hyper :: Body :: empty ( ) ) . unwrap ( ) ; self . execute_async ( request ) . await . and_then ( | response | { match response . status { 200 => Ok ( json :: from_str ( response . body_as_string ( ) . as_str ( ) ) . unwrap ( ) ) , 400 => Err ( DockerError :: BadParameters ( json :: from_str ( response . body_as_string ( ) . as_str ( ) ) . unwrap ( ) ) ) , 500 => Err ( DockerError :: ServerError ( json :: from_str ( response . body_as_string ( ) . as_str ( ) ) . unwrap ( ) ) ) , _ => Err ( DockerError :: UnknownStatus ) , } } ) }
Delete unused volumes
Return empty or DockerError
Delete unused volumes Return empty or DockerError
&self
&self
examples
None
use docker_client::{dockerclient, dockererror};
fn main() {
let client = DockerClient::new().




fn main () { let client = DockerClient :: new () .