pub struct Ports { /* private fields */ }
๐Deprecated since 0.3.1: Testcontainers is no longer using microcrates, please upgrade to testcontainers version 0.8
Expand description
The exposed ports of a running container.
Implementationsยง
Sourceยงimpl Ports
impl Ports
Sourcepub fn add_mapping(&mut self, internal: u32, host: u32) -> &mut Self
๐Deprecated since 0.3.1: Testcontainers is no longer using microcrates, please upgrade to testcontainers version 0.8
pub fn add_mapping(&mut self, internal: u32, host: u32) -> &mut Self
Registers the mapping of an exposed port.
Sourcepub fn map_to_host_port(&self, internal_port: u32) -> Option<u32>
๐Deprecated since 0.3.1: Testcontainers is no longer using microcrates, please upgrade to testcontainers version 0.8
pub fn map_to_host_port(&self, internal_port: u32) -> Option<u32>
Returns the host port for the given internal port.
Trait Implementationsยง
impl StructuralPartialEq for Ports
Auto Trait Implementationsยง
impl Freeze for Ports
impl RefUnwindSafe for Ports
impl Send for Ports
impl Sync for Ports
impl Unpin for Ports
impl UnwindSafe for Ports
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