Struct PortMapping
pub struct PortMapping { /* private fields */ }Expand description
A Docker port mapping.
Implementations§
§impl PortMapping
impl PortMapping
pub fn new(
host_ip: Option<String>,
host_port: Option<PortNumber>,
container_port: PortNumber,
protocol: PortProtocol,
) -> PortMapping
pub fn new( host_ip: Option<String>, host_port: Option<PortNumber>, container_port: PortNumber, protocol: PortProtocol, ) -> PortMapping
Creates a mapping from validated parts.
pub const fn host_port(&self) -> Option<PortNumber>
pub const fn host_port(&self) -> Option<PortNumber>
Returns the optional host port.
pub const fn container_port(&self) -> PortNumber
pub const fn container_port(&self) -> PortNumber
Returns the container port.
pub const fn protocol(&self) -> PortProtocol
pub const fn protocol(&self) -> PortProtocol
Returns the protocol.
Trait Implementations§
§impl Clone for PortMapping
impl Clone for PortMapping
§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 more§impl Debug for PortMapping
impl Debug for PortMapping
§impl Display for PortMapping
impl Display for PortMapping
§impl FromStr for PortMapping
impl FromStr for PortMapping
§impl Hash for PortMapping
impl Hash for PortMapping
§impl Ord for PortMapping
impl Ord for PortMapping
§impl PartialEq for PortMapping
impl PartialEq for PortMapping
§impl PartialOrd for PortMapping
impl PartialOrd for PortMapping
§impl TryFrom<&str> for PortMapping
impl TryFrom<&str> 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