pub struct ComposeInfo {
pub project: Option<String>,
pub service: Option<String>,
}Expand description
Compose metadata extracted from Docker Compose labels.
Fields§
§project: Option<String>§service: Option<String>Implementations§
Source§impl ComposeInfo
impl ComposeInfo
Sourcepub fn from_labels(labels: &HashMap<String, String>) -> Self
pub fn from_labels(labels: &HashMap<String, String>) -> Self
Extract from Docker labels.
Sourcepub fn effective_name<'a>(&'a self, container_name: &'a str) -> &'a str
pub fn effective_name<'a>(&'a self, container_name: &'a str) -> &'a str
Best available service name: Compose service > container name.
Trait Implementations§
Source§impl Clone for ComposeInfo
impl Clone for ComposeInfo
Source§fn clone(&self) -> ComposeInfo
fn clone(&self) -> ComposeInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComposeInfo
impl Debug for ComposeInfo
Source§impl Default for ComposeInfo
impl Default for ComposeInfo
Source§fn default() -> ComposeInfo
fn default() -> ComposeInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ComposeInfo
impl RefUnwindSafe for ComposeInfo
impl Send for ComposeInfo
impl Sync for ComposeInfo
impl Unpin for ComposeInfo
impl UnsafeUnpin for ComposeInfo
impl UnwindSafe for ComposeInfo
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
Mutably borrows from an owned value. Read more