pub struct Exec { /* private fields */ }
Expand description
Interface for docker exec instance
Implementations
sourceimpl Exec
impl Exec
sourcepub async fn create<C>(
docker: Docker,
container_id: C,
opts: &ExecContainerOpts
) -> Result<Exec> where
C: AsRef<str>,
pub async fn create<C>(
docker: Docker,
container_id: C,
opts: &ExecContainerOpts
) -> Result<Exec> where
C: AsRef<str>,
Creates a new exec instance that will be executed in a container with id == container_id.
sourcepub fn get<ID>(docker: Docker, id: ID) -> Exec where
ID: Into<ExecId>,
pub fn get<ID>(docker: Docker, id: ID) -> Exec where
ID: Into<ExecId>,
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.
sourcepub fn start(&self) -> impl Stream<Item = Result<TtyChunk>> + '_
pub fn start(&self) -> impl Stream<Item = Result<TtyChunk>> + '_
Starts this exec instance returning a multiplexed tty stream.
sourcepub async fn resize(&self, opts: &ExecResizeOpts) -> Result<()>
pub async fn resize(&self, opts: &ExecResizeOpts) -> Result<()>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more