pub struct Pyo3Exec { /* private fields */ }Expand description
Represents a Docker exec instance for running commands in containers.
Use this to inspect or resize an exec session that was created with Container.exec_create().
Implementations§
Source§impl Pyo3Exec
impl Pyo3Exec
Sourcepub fn new(docker: Pyo3Docker, id: &str) -> Self
pub fn new(docker: Pyo3Docker, id: &str) -> Self
Get an existing exec instance by ID.
Args: docker: Docker client instance id: Exec instance ID
Returns: Exec: Exec instance
Sourcepub fn inspect(&self) -> PyResult<Py<PyAny>>
pub fn inspect(&self) -> PyResult<Py<PyAny>>
Inspect the exec instance to get detailed information.
Returns information about the exec instance including its running state, exit code, process config, and container ID.
Returns: dict: Detailed exec information including: - id: Exec instance ID - running: Whether the exec is running - exit_code: Exit code (if completed) - process_config: Command and environment - container_id: ID of the container
Raises: SystemError: If inspect fails
Sourcepub fn resize(&self, width: u64, height: u64) -> PyResult<()>
pub fn resize(&self, width: u64, height: u64) -> PyResult<()>
Resize the TTY session for this exec instance.
This only works if the exec was created with tty=True. Use this to adjust terminal dimensions for interactive sessions.
Args: width: New terminal width in columns height: New terminal height in rows
Returns: None
Raises: SystemError: If resize fails (e.g., exec not created with TTY)
Trait Implementations§
Source§impl<'py> IntoPyObject<'py> for Pyo3Exec
impl<'py> IntoPyObject<'py> for Pyo3Exec
Source§type Output = Bound<'py, <Pyo3Exec as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <Pyo3Exec as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClassImpl for Pyo3Exec
impl PyClassImpl for Pyo3Exec
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Represents a Docker exec instance for running commands in containers.
///
/// Use this to inspect or resize an exec session that was created with
/// Container.exec_create().
const RAW_DOC: &'static CStr = /// Represents a Docker exec instance for running commands in containers. /// /// Use this to inspect or resize an exec session that was created with /// Container.exec_create().
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<Pyo3Exec>
type ThreadChecker = SendablePyClass<Pyo3Exec>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for Pyo3Exec
impl PyClassNewTextSignature for Pyo3Exec
const TEXT_SIGNATURE: &'static str = "(docker, id)"
Source§impl PyMethods<Pyo3Exec> for PyClassImplCollector<Pyo3Exec>
impl PyMethods<Pyo3Exec> for PyClassImplCollector<Pyo3Exec>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for Pyo3Exec
impl PyTypeInfo for Pyo3Exec
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
impl DerefToPyAny for Pyo3Exec
impl ExtractPyClassWithClone for Pyo3Exec
Auto Trait Implementations§
impl Freeze for Pyo3Exec
impl !RefUnwindSafe for Pyo3Exec
impl Send for Pyo3Exec
impl Sync for Pyo3Exec
impl Unpin for Pyo3Exec
impl !UnwindSafe for Pyo3Exec
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.