pub struct ServicePort {
pub raw: String,
pub position: Position,
pub is_quoted: bool,
pub host_port: Option<u16>,
pub container_port: u16,
pub host_ip: Option<String>,
pub protocol: Option<String>,
}Expand description
Port mapping for a service.
Fields§
§raw: StringRaw port string (e.g., “8080:80” or “80”).
position: PositionPosition in the source.
is_quoted: boolWhether the port is quoted in source.
host_port: Option<u16>Host port (if specified).
container_port: u16Container port.
host_ip: Option<String>Host IP binding (e.g., “127.0.0.1”).
protocol: Option<String>Protocol (tcp/udp).
Implementations§
Source§impl ServicePort
impl ServicePort
Sourcepub fn parse(raw: &str, position: Position, is_quoted: bool) -> Option<Self>
pub fn parse(raw: &str, position: Position, is_quoted: bool) -> Option<Self>
Parse a port string.
Sourcepub fn has_explicit_interface(&self) -> bool
pub fn has_explicit_interface(&self) -> bool
Check if this port has an explicit host binding interface.
Sourcepub fn exported_port(&self) -> Option<String>
pub fn exported_port(&self) -> Option<String>
Get the exported port (for duplicate checking).
Trait Implementations§
Source§impl Clone for ServicePort
impl Clone for ServicePort
Source§fn clone(&self) -> ServicePort
fn clone(&self) -> ServicePort
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 ServicePort
impl RefUnwindSafe for ServicePort
impl Send for ServicePort
impl Sync for ServicePort
impl Unpin for ServicePort
impl UnwindSafe for ServicePort
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> 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> 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 moreCreates a shared type from an unshared type.