pub struct ExecSession {
pub exec_id: String,
pub input: Pin<Box<dyn AsyncWrite + Send>>,
pub output: Pin<Box<dyn Stream<Item = Result<LogOutput, Error>> + Send>>,
}Expand description
Exec session handle for a single turn.
input is the stdin pipe into the container process (write JSON message here,
then drop/flush to send EOF). output is a bollard LogOutput stream; with
tty: false Docker multiplexes stdout as LogOutput::StdOut frames and
stderr as LogOutput::StdErr frames.
Env vars are passed via CreateExecOptions.env (Docker socket) — they never
appear in process argv, preventing CWE-214 credential exposure via ps/proc.
Fields§
§exec_id: StringDocker exec id — pass to ContainerManager::inspect_exec after the
output stream ends to retrieve the process’s real exit code. The stream
ending is NOT the exit status, so callers that care about success/failure
must inspect the exec (the in-container CLI can exit non-zero while still
closing stdout cleanly).
input: Pin<Box<dyn AsyncWrite + Send>>Stdin pipe to the container process. Write the JSON message then flush/drop.
output: Pin<Box<dyn Stream<Item = Result<LogOutput, Error>> + Send>>Multiplexed stdout/stderr stream (LogOutput::StdOut / LogOutput::StdErr).
Auto Trait Implementations§
impl Freeze for ExecSession
impl !RefUnwindSafe for ExecSession
impl Send for ExecSession
impl !Sync for ExecSession
impl Unpin for ExecSession
impl !UnwindSafe for ExecSession
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more