pub struct Pyo3ComposeFile {
pub version: Option<String>,
pub services: HashMap<String, ComposeService>,
pub networks: HashMap<String, Option<ComposeNetwork>>,
pub volumes: HashMap<String, Option<ComposeVolume>>,
pub configs: HashMap<String, Option<ComposeConfig>>,
pub secrets: HashMap<String, Option<ComposeSecret>>,
pub name: Option<String>,
}Expand description
Represents a parsed Docker Compose file.
Use parse_compose_file() or parse_compose_string() to create instances.
Fields§
§version: Option<String>Compose file format version (e.g., “3.8”, “3”, “2.1”)
services: HashMap<String, ComposeService>Service definitions
networks: HashMap<String, Option<ComposeNetwork>>Network definitions
volumes: HashMap<String, Option<ComposeVolume>>Volume definitions
configs: HashMap<String, Option<ComposeConfig>>Config definitions (Swarm mode)
secrets: HashMap<String, Option<ComposeSecret>>Secret definitions (Swarm mode)
name: Option<String>Top-level name for the project
Implementations§
Source§impl Pyo3ComposeFile
impl Pyo3ComposeFile
Sourcepub fn get_version(&self) -> Option<String>
pub fn get_version(&self) -> Option<String>
Get the compose file version.
Returns: str | None: Version string if specified
Sourcepub fn get_name(&self) -> Option<String>
pub fn get_name(&self) -> Option<String>
Get the project name.
Returns: str | None: Project name if specified
Sourcepub fn service_names(&self) -> Vec<String>
pub fn service_names(&self) -> Vec<String>
Get list of service names.
Returns: liststr: List of service names
Sourcepub fn network_names(&self) -> Vec<String>
pub fn network_names(&self) -> Vec<String>
Get list of network names.
Returns: liststr: List of network names
Sourcepub fn volume_names(&self) -> Vec<String>
pub fn volume_names(&self) -> Vec<String>
Get list of volume names.
Returns: liststr: List of volume names
Sourcepub fn config_names(&self) -> Vec<String>
pub fn config_names(&self) -> Vec<String>
Get list of config names (Swarm mode).
Returns: liststr: List of config names
Sourcepub fn secret_names(&self) -> Vec<String>
pub fn secret_names(&self) -> Vec<String>
Get list of secret names (Swarm mode).
Returns: liststr: List of secret names
Sourcepub fn to_dict(&self, py: Python<'_>) -> PyResult<Py<PyAny>>
pub fn to_dict(&self, py: Python<'_>) -> PyResult<Py<PyAny>>
Get the full compose file as a dictionary.
Returns: dict: Complete compose file structure as nested dict
Trait Implementations§
Source§impl Clone for Pyo3ComposeFile
impl Clone for Pyo3ComposeFile
Source§fn clone(&self) -> Pyo3ComposeFile
fn clone(&self) -> Pyo3ComposeFile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Pyo3ComposeFile
impl Debug for Pyo3ComposeFile
Source§impl<'de> Deserialize<'de> for Pyo3ComposeFile
impl<'de> Deserialize<'de> for Pyo3ComposeFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'py> IntoPyObject<'py> for Pyo3ComposeFile
impl<'py> IntoPyObject<'py> for Pyo3ComposeFile
Source§type Target = Pyo3ComposeFile
type Target = Pyo3ComposeFile
Source§type Output = Bound<'py, <Pyo3ComposeFile as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <Pyo3ComposeFile 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 PyClass for Pyo3ComposeFile
impl PyClass for Pyo3ComposeFile
Source§impl PyClassImpl for Pyo3ComposeFile
impl PyClassImpl for Pyo3ComposeFile
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 parsed Docker Compose file.
///
/// Use `parse_compose_file()` or `parse_compose_string()` to create instances.
const RAW_DOC: &'static CStr = /// Represents a parsed Docker Compose file. /// /// Use `parse_compose_file()` or `parse_compose_string()` to create instances.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<Pyo3ComposeFile>
type ThreadChecker = SendablePyClass<Pyo3ComposeFile>
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 PyMethods<Pyo3ComposeFile> for PyClassImplCollector<Pyo3ComposeFile>
impl PyMethods<Pyo3ComposeFile> for PyClassImplCollector<Pyo3ComposeFile>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for Pyo3ComposeFile
impl PyTypeInfo for Pyo3ComposeFile
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>
Source§impl Serialize for Pyo3ComposeFile
impl Serialize for Pyo3ComposeFile
impl DerefToPyAny for Pyo3ComposeFile
impl ExtractPyClassWithClone for Pyo3ComposeFile
Auto Trait Implementations§
impl Freeze for Pyo3ComposeFile
impl RefUnwindSafe for Pyo3ComposeFile
impl Send for Pyo3ComposeFile
impl Sync for Pyo3ComposeFile
impl Unpin for Pyo3ComposeFile
impl UnwindSafe for Pyo3ComposeFile
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, 'py, T> FromPyObject<'a, 'py> for T
impl<'a, 'py, T> FromPyObject<'a, 'py> for 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.