pub struct ExposePortBuilder {
pub host_port: Option<u16>,
pub container_port: Option<Option<u16>>,
pub family: Option<String>,
}Expand description
Builder for ExposePort.
Fields§
§host_port: Option<u16>Port the container_port should be exposed to on the host.
container_port: Option<Option<u16>>Port the host_port should map to into the container.
family: Option<String>Family of the exposed port.
Can be left blank, tcp will be used as default.
Implementations§
Source§impl ExposePortBuilder
impl ExposePortBuilder
Sourcepub fn host_port(&mut self, value: u16) -> &mut Self
pub fn host_port(&mut self, value: u16) -> &mut Self
Port the container_port should be exposed to on the host.
Sourcepub fn container_port(&mut self, value: Option<u16>) -> &mut Self
pub fn container_port(&mut self, value: Option<u16>) -> &mut Self
Port the host_port should map to into the container.
Sourcepub fn family(&mut self, value: String) -> &mut Self
pub fn family(&mut self, value: String) -> &mut Self
Family of the exposed port.
Can be left blank, tcp will be used as default.
Sourcepub fn build(&self) -> Result<ExposePort, ExposePortBuilderError>
pub fn build(&self) -> Result<ExposePort, ExposePortBuilderError>
Trait Implementations§
Source§impl Clone for ExposePortBuilder
impl Clone for ExposePortBuilder
Source§fn clone(&self) -> ExposePortBuilder
fn clone(&self) -> ExposePortBuilder
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 moreAuto Trait Implementations§
impl Freeze for ExposePortBuilder
impl RefUnwindSafe for ExposePortBuilder
impl Send for ExposePortBuilder
impl Sync for ExposePortBuilder
impl Unpin for ExposePortBuilder
impl UnwindSafe for ExposePortBuilder
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