pub struct SgListener {
pub name: String,
pub ip: Option<IpAddr>,
pub port: u16,
pub protocol: SgProtocolConfig,
pub hostname: Option<String>,
}
Expand description
Listener embodies the concept of a logical endpoint where a Gateway accepts network connections.
Fields§
§name: String
Name is the name of the Listener. This name MUST be unique within a Gateway.
ip: Option<IpAddr>
Ip bound to the Listener. Default is 0.0.0.0
port: u16
Port is the network port. Multiple listeners may use the same port, subject to the Listener compatibility rules.
protocol: SgProtocolConfig
Protocol specifies the network protocol this listener expects to receive.
hostname: Option<String>
HostName
is used to define the host on which the listener accepts requests.
Trait Implementations§
Source§impl Clone for SgListener
impl Clone for SgListener
Source§fn clone(&self) -> SgListener
fn clone(&self) -> SgListener
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 SgListener
impl Debug for SgListener
Source§impl Default for SgListener
impl Default for SgListener
Source§fn default() -> SgListener
fn default() -> SgListener
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SgListenerwhere
SgListener: Default,
impl<'de> Deserialize<'de> for SgListenerwhere
SgListener: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SgListener, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SgListener, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SgListener
impl Serialize for SgListener
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SgListener
impl RefUnwindSafe for SgListener
impl Send for SgListener
impl Sync for SgListener
impl Unpin for SgListener
impl UnwindSafe for SgListener
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> 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