pub enum ContainerPort {
Tcp(u16),
Udp(u16),
Sctp(u16),
}Expand description
Represents a port that is exposed by a container.
There is a helper IntoContainerPort trait to convert a u16 into a ContainerPort.
Also, u16 can be directly converted into a ContainerPort using Into::into, it will default to ContainerPort::Tcp.
Variantsยง
Implementationsยง
Trait Implementationsยง
Sourceยงimpl Clone for ContainerPort
impl Clone for ContainerPort
Sourceยงfn clone(&self) -> ContainerPort
fn clone(&self) -> ContainerPort
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 ContainerPort
impl Debug for ContainerPort
Sourceยงimpl Display for ContainerPort
impl Display for ContainerPort
Sourceยงimpl From<u16> for ContainerPort
impl From<u16> for ContainerPort
Sourceยงfn from(port: u16) -> ContainerPort
fn from(port: u16) -> ContainerPort
Converts to this type from the input type.
Sourceยงimpl FromStr for ContainerPort
impl FromStr for ContainerPort
Sourceยงtype Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
Sourceยงfn from_str(s: &str) -> Result<ContainerPort, <ContainerPort as FromStr>::Err>
fn from_str(s: &str) -> Result<ContainerPort, <ContainerPort as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSourceยงimpl Hash for ContainerPort
impl Hash for ContainerPort
Sourceยงimpl PartialEq for ContainerPort
impl PartialEq for ContainerPort
impl Copy for ContainerPort
impl Eq for ContainerPort
impl StructuralPartialEq for ContainerPort
Auto Trait Implementationsยง
impl Freeze for ContainerPort
impl RefUnwindSafe for ContainerPort
impl Send for ContainerPort
impl Sync for ContainerPort
impl Unpin for ContainerPort
impl UnwindSafe for ContainerPort
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<T> ImageRepository for Twhere
T: Display,
impl<T> ImageRepository for Twhere
T: Display,
fn image_path(&self, image: &str) -> String
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more