pub enum NetworkModeSpec {
Default,
Host,
None,
Named(ContainerNetworkAttachment),
}Expand description
The network a container joins at create time, from HostConfig.NetworkMode.
container:<name|id> is deliberately absent: it is rejected during planning
rather than modelled, because reproducing it would require resolving the
peer container and ordering creation around it.
Variants§
Default
The default bridge network; no --network flag is emitted.
Host
Host networking.
None
No networking.
Named(ContainerNetworkAttachment)
A user-defined network that is part of this migration.
Implementations§
Source§impl NetworkModeSpec
impl NetworkModeSpec
Sourcepub const fn forbids_extra_networks(&self) -> bool
pub const fn forbids_extra_networks(&self) -> bool
Returns whether this mode shares another namespace, which bars the container from joining any further network.
Docker rejects that combination outright (“container sharing network namespace with another container or host cannot be connected to any other network”), so additional attachments must be skipped.
Trait Implementations§
Source§impl Clone for NetworkModeSpec
impl Clone for NetworkModeSpec
Source§fn clone(&self) -> NetworkModeSpec
fn clone(&self) -> NetworkModeSpec
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 NetworkModeSpec
impl Debug for NetworkModeSpec
Source§impl Default for NetworkModeSpec
impl Default for NetworkModeSpec
Source§fn default() -> NetworkModeSpec
fn default() -> NetworkModeSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NetworkModeSpec
impl<'de> Deserialize<'de> for NetworkModeSpec
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NetworkModeSpec
Source§impl PartialEq for NetworkModeSpec
impl PartialEq for NetworkModeSpec
Source§impl Serialize for NetworkModeSpec
impl Serialize for NetworkModeSpec
impl StructuralPartialEq for NetworkModeSpec
Auto Trait Implementations§
impl Freeze for NetworkModeSpec
impl RefUnwindSafe for NetworkModeSpec
impl Send for NetworkModeSpec
impl Sync for NetworkModeSpec
impl Unpin for NetworkModeSpec
impl UnsafeUnpin for NetworkModeSpec
impl UnwindSafe for NetworkModeSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.