pub enum NetworkMode {
Default,
Host,
None,
Bridge {
name: Option<String>,
},
Container {
id: String,
},
}Expand description
Network mode for a service container.
Mirrors Docker’s HostConfig.NetworkMode semantics. Accepts both an
enum-tagged form (e.g. network_mode: { bridge: { name: my-net } }) and a
string form (e.g. "host", "bridge:my-net", "container:abc123").
Variants§
Default
Default networking (overlay / bridge as configured by the platform).
Host
Share the host network namespace (Docker --network host).
None
Disable networking entirely (Docker --network none).
Bridge
Attach to a Docker bridge network. When name is None, uses the
default bridge network.
Container
Attach to another container’s network namespace
(Docker --network container:<id>).
Trait Implementations§
Source§impl Clone for NetworkMode
impl Clone for NetworkMode
Source§fn clone(&self) -> NetworkMode
fn clone(&self) -> NetworkMode
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 NetworkMode
impl Debug for NetworkMode
Source§impl Default for NetworkMode
impl Default for NetworkMode
Source§fn default() -> NetworkMode
fn default() -> NetworkMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NetworkMode
impl<'de> Deserialize<'de> for NetworkMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NetworkMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NetworkMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Inner> for NetworkMode
impl From<Inner> for NetworkMode
Source§fn from(i: Inner) -> NetworkMode
fn from(i: Inner) -> NetworkMode
Converts to this type from the input type.
Source§impl PartialEq for NetworkMode
impl PartialEq for NetworkMode
Source§fn eq(&self, other: &NetworkMode) -> bool
fn eq(&self, other: &NetworkMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NetworkMode
impl Serialize for NetworkMode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl ToSchema for NetworkMode
impl ToSchema for NetworkMode
impl Eq for NetworkMode
impl StructuralPartialEq for NetworkMode
Auto Trait Implementations§
impl Freeze for NetworkMode
impl RefUnwindSafe for NetworkMode
impl Send for NetworkMode
impl Sync for NetworkMode
impl Unpin for NetworkMode
impl UnsafeUnpin for NetworkMode
impl UnwindSafe for NetworkMode
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,
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.