pub async fn inspect_container(&self, request: Inspect) -> Result<ContainerInfo, DockerError> {

        let uri = self.make_uri(request.get_path());
        let request = Request::get(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()),
                    404 => Err(DockerError::NotFound(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),
                }
            })
            .map_err(|e| e)
    }
/// Inspect a container.
///
/// Return `ContainerInfo` structure about a container.
///
/// # Arguments
/// * `id` - ID or name of the container.
/// * `size` - Return the size of container as fields SizeRw and SizeRootFs.
///
/// # Examples
///
/// ```rust
/// use docker_client::{DockerClient, DockerError};
/// use docker_client::container::inspect::Inspect;
///
/// fn main() {
///
///    let client = DockerClient::new();
///
///     match client.inspect_container(Inspect::container("vigilant_antonelli".to_string())) {
///         Ok(s) => { println!("{:?}", s) }
///         Err(e) => {}
///     }
///
/// }
/// ```
Inspect a container.
Return `ContainerInfo` structure about a container.
Inspect a container . Return ` ContainerInfo ` structure about a container .
pub async fn inspect_container(&self, request: Inspect) -> Result<ContainerInfo, DockerError> {
        let uri = self.make_uri(request.get_path());
        let request = Request::get(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()),
                    404 => Err(DockerError::NotFound(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),
                }
            })
            .map_err(|e| e)
    }
pub async fn inspect_container ( & self , request : Inspect ) -> Result < ContainerInfo , DockerError > { let uri = self . make_uri ( request . get_path ( ) ) ; let request = Request :: get ( 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 ( ) ) , 404 => Err ( DockerError :: NotFound ( 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 ) , } } ) . map_err ( | e | e ) }
Inspect a container.
Inspect a container .
&self
request
Inspect
&self
request
Inspect
examples
```rust
use docker_client::{DockerClient, DockerError};
use docker_client::container::inspect::Inspect.

fn main() {

let client = DockerClient::new().

match client.inspect_container(Inspect::container("vigilant_antonelli".to_string())) {
Ok(s) => { println!("{:?}", s) }
Err(e) => {}
}


` ` ` rust use docker_client :: { DockerClient DockerError } ; use docker_client :: container :: inspect :: Inspect . fn main () { let client = DockerClient :: new () . match client . inspect_container ( Inspect :: container ( " vigilant_antonelli " . to_string () )) { Ok ( s ) = > { println! ( " { : ? } " s ) } Err ( e ) = > {} }