pub struct PortSettings {
pub name: Option<String>,
pub host_ip: Option<String>,
pub target: Option<StringOrNum>,
pub published: Option<StringOrNum>,
pub mode: Option<PortMode>,
pub protocol: Option<Protocol>,
pub app_protocol: Option<String>,
}Expand description
Settings for a port mapping.
See more: https://docs.docker.com/reference/compose-file/services/#long-syntax-4
Fields§
§name: Option<String>A human-readable name for this port mapping.
host_ip: Option<String>The host IP to bind to.
target: Option<StringOrNum>The port inside the container.
published: Option<StringOrNum>The publicly exposed port.
mode: Option<PortMode>The port binding mode, either ‘host’ for publishing a host port or ‘ingress’ for load balancing.
protocol: Option<Protocol>The port protocol (tcp or udp).
app_protocol: Option<String>The application protocol (TCP/IP level 4 / OSI level 7) this port is used for. This is optional and can be used as a hint for Compose to offer richer behavior for protocols that it understands.
Trait Implementations§
Source§impl Clone for PortSettings
impl Clone for PortSettings
Source§fn clone(&self) -> PortSettings
fn clone(&self) -> PortSettings
Returns a duplicate of the value. Read more
1.0.0 · 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 PortSettings
impl Debug for PortSettings
Source§impl Default for PortSettings
impl Default for PortSettings
Source§fn default() -> PortSettings
fn default() -> PortSettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PortSettingswhere
PortSettings: Default,
impl<'de> Deserialize<'de> for PortSettingswhere
PortSettings: Default,
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
Source§impl Ord for PortSettings
impl Ord for PortSettings
Source§fn cmp(&self, other: &PortSettings) -> Ordering
fn cmp(&self, other: &PortSettings) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PortSettings
impl PartialEq for PortSettings
Source§impl PartialOrd for PortSettings
impl PartialOrd for PortSettings
Source§impl Serialize for PortSettings
impl Serialize for PortSettings
impl Eq for PortSettings
impl StructuralPartialEq for PortSettings
Auto Trait Implementations§
impl Freeze for PortSettings
impl RefUnwindSafe for PortSettings
impl Send for PortSettings
impl Sync for PortSettings
impl Unpin for PortSettings
impl UnsafeUnpin for PortSettings
impl UnwindSafe for PortSettings
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.