pub struct ContainerHandle {
    name: String,
    pub ip_address: String,
    pub port_mappings: HashMap<u16, u16>,
}
Expand description

A handle to a running container.

You can use this to interact with the container.

Fields§

§name: String

The name of the container.

§ip_address: String

The IP address of the container.

NOTE: This is currently unused, but may be useful so I left it in. This can only be used on Linux. macOS and Windows docker doesn’t allow direct connection to the container.

§port_mappings: HashMap<u16, u16>

Port mappings of container_port to host_port for ports exposed via EXPOSE.

Implementations§

Executes a program inside a running container.

Returns the contents of a file inside the container.

Trait Implementations§

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 96 bytes