Struct docker_api::api::exec::Exec

source ·
pub struct Exec { /* private fields */ }
Expand description

Api Reference

Interface for docker exec instance

Implementations§

source§

impl Exec

source

pub fn get(docker: Docker, id: impl Into<Id>) -> Exec

Get a reference to a set of operations available to an already created exec instance.

It’s in callers responsibility to ensure that exec instance with specified id actually exists. Use Exec::create to ensure that the exec instance is created beforehand.

source

pub async fn inspect(&self) -> Result<ExecInspect200Response>

Api Reference

Inspect this Exec instance

source

pub async fn create( docker: Docker, container_id: impl AsRef<str>, opts: &ExecCreateOpts ) -> Result<Exec>

Api Reference

Creates a new exec instance that will be executed in a container with id == container_id.

source

pub async fn start(&self, opts: &ExecStartOpts) -> Result<Multiplexer>

Api Reference

Starts this exec instance returning a multiplexed tty stream.

source

pub async fn resize(&self, opts: &ExecResizeOpts) -> Result<()>

Api Reference

Resize the TTY session used by an exec instance. This only works if the exec was created with tty enabled.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Exec

§

impl Send for Exec

§

impl Sync for Exec

§

impl Unpin for Exec

§

impl !UnwindSafe for Exec

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more