pub struct PortBuilder { /* private fields */ }
Expand description
Helper for building port mappings
Implementations§
Source§impl PortBuilder
impl PortBuilder
Sourcepub fn port_with_protocol(
self,
host_port: u16,
container_port: u16,
protocol: Protocol,
) -> Self
pub fn port_with_protocol( self, host_port: u16, container_port: u16, protocol: Protocol, ) -> Self
Add a port mapping with protocol
Sourcepub fn dynamic_port(self, container_port: u16) -> Self
pub fn dynamic_port(self, container_port: u16) -> Self
Add a dynamic port mapping (Docker assigns host port)
Sourcepub fn build_args(&self) -> Vec<String>
pub fn build_args(&self) -> Vec<String>
Build the port arguments for Docker
Sourcepub fn mappings(&self) -> &[PortMapping]
pub fn mappings(&self) -> &[PortMapping]
Get the port mappings
Trait Implementations§
Source§impl Clone for PortBuilder
impl Clone for PortBuilder
Source§fn clone(&self) -> PortBuilder
fn clone(&self) -> PortBuilder
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 PortBuilder
impl Debug for PortBuilder
Source§impl Default for PortBuilder
impl Default for PortBuilder
Source§fn default() -> PortBuilder
fn default() -> PortBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PortBuilder
impl RefUnwindSafe for PortBuilder
impl Send for PortBuilder
impl Sync for PortBuilder
impl Unpin for PortBuilder
impl UnwindSafe for PortBuilder
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