pub struct PortMapping {
pub host_port: Option<u16>,
pub container_port: u16,
pub protocol: PortProtocol,
pub host_ip: String,
}Expand description
A single host-to-container port publish rule (Docker’s -p).
When host_port is None (or explicitly Some(0)), the container runtime
assigns an ephemeral host port. host_ip defaults to "0.0.0.0" to bind
on all interfaces.
Fields§
§host_port: Option<u16>Host port. None (or zero) means “assign an ephemeral port”.
container_port: u16Container-side port.
protocol: PortProtocolTransport protocol (defaults to TCP).
host_ip: StringHost interface to bind on. Defaults to "0.0.0.0" (all interfaces).
Trait Implementations§
Source§impl Clone for PortMapping
impl Clone for PortMapping
Source§fn clone(&self) -> PortMapping
fn clone(&self) -> PortMapping
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 ComposeSchema for PortMapping
impl ComposeSchema for PortMapping
Source§impl Debug for PortMapping
impl Debug for PortMapping
Source§impl<'de> Deserialize<'de> for PortMapping
impl<'de> Deserialize<'de> for PortMapping
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 PartialEq for PortMapping
impl PartialEq for PortMapping
Source§impl Serialize for PortMapping
impl Serialize for PortMapping
Source§impl ToSchema for PortMapping
impl ToSchema for PortMapping
impl Eq for PortMapping
impl StructuralPartialEq for PortMapping
Auto Trait Implementations§
impl Freeze for PortMapping
impl RefUnwindSafe for PortMapping
impl Send for PortMapping
impl Sync for PortMapping
impl Unpin for PortMapping
impl UnsafeUnpin for PortMapping
impl UnwindSafe for PortMapping
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.