pub struct Network<'docker> { /* private fields */ }
Expand description
Interface for accessing and manipulating a docker network
Implementations§
Source§impl<'docker> Network<'docker>
impl<'docker> Network<'docker>
Sourcepub fn new<S>(docker: &'docker Docker, id: S) -> Self
pub fn new<S>(docker: &'docker Docker, id: S) -> Self
Exports an interface exposing operations against a network instance
Sourcepub async fn inspect(&self) -> Result<NetworkDetails>
pub async fn inspect(&self) -> Result<NetworkDetails>
Inspects the current docker network instance’s details
API Reference: https://docs.docker.com/engine/api/v1.41/#operation/NetworkInspect
Sourcepub async fn delete(&self) -> Result<()>
pub async fn delete(&self) -> Result<()>
Delete the network instance
API Reference: https://docs.docker.com/engine/api/v1.41/#operation/NetworkDelete
Sourcepub async fn connect(&self, opts: &ContainerConnectionOptions) -> Result<()>
pub async fn connect(&self, opts: &ContainerConnectionOptions) -> Result<()>
Connect container to network
API Reference: https://docs.docker.com/engine/api/v1.41/#operation/NetworkConnect
Sourcepub async fn disconnect(&self, opts: &ContainerConnectionOptions) -> Result<()>
pub async fn disconnect(&self, opts: &ContainerConnectionOptions) -> Result<()>
Disconnect container to network
API Reference: https://docs.docker.com/engine/api/v1.41/#operation/NetworkDisconnect
Auto Trait Implementations§
impl<'docker> Freeze for Network<'docker>
impl<'docker> !RefUnwindSafe for Network<'docker>
impl<'docker> Send for Network<'docker>
impl<'docker> Sync for Network<'docker>
impl<'docker> Unpin for Network<'docker>
impl<'docker> !UnwindSafe for Network<'docker>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more