Struct spirit_tokio::net::UdpListen [−][src]
#[non_exhaustive]pub struct UdpListen<ExtraCfg = Empty> {
pub listen: Listen,
pub extra_cfg: ExtraCfg,
}
Expand description
A configuration fragment describing a bound UDP socket.
This is similar to TcpListen
, but for UDP sockets.
Type parameters
ExtraCfg
: Extra options folded into this configuration, for application specific options. They don’t influence the socket in any way.
Configuration options
In addition to options provided by the above type parameters, the options from Listen
are
prestent.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.listen: Listen
Configuration for the address to bind to.
extra_cfg: ExtraCfg
Arbitrary application specific configuration that doesn’t influence the created socket, but
can be examined in the handlers
.
Trait Implementations
Compares two fragments.
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type Driver = CacheSimilar<Self>
type Driver = CacheSimilar<Self>
The default driver to be used by the fragment. Read more
The default installer to be used unless a transformation or the user doesn’t provide one. Read more
type Seed = StdUdpSocket
type Seed = StdUdpSocket
Runs the first stage of creation. Read more
Runs the second stage of creation. Read more
Configuration if the pipeline should be run once even before the config is loaded. Read more
Runs both stages of creation at once. Read more
fn init<B>(
builder: B,
&'static str
) -> Result<B, Box<dyn Error + Send + Sync + 'static, Global>> where
B: Extensible<Ok = B>,
<B as Extensible>::Config: 'static,
<B as Extensible>::Config: DeserializeOwned,
<B as Extensible>::Config: Send,
<B as Extensible>::Config: Sync,
<B as Extensible>::Opts: 'static,
<B as Extensible>::Opts: StructOpt,
<B as Extensible>::Opts: Send,
<B as Extensible>::Opts: Sync,
fn init<B>(
builder: B,
&'static str
) -> Result<B, Box<dyn Error + Send + Sync + 'static, Global>> where
B: Extensible<Ok = B>,
<B as Extensible>::Config: 'static,
<B as Extensible>::Config: DeserializeOwned,
<B as Extensible>::Config: Send,
<B as Extensible>::Config: Sync,
<B as Extensible>::Opts: 'static,
<B as Extensible>::Opts: StructOpt,
<B as Extensible>::Opts: Send,
<B as Extensible>::Opts: Sync,
An initialization routine. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the documentation for the type. Read more
Auto Trait Implementations
impl<ExtraCfg> RefUnwindSafe for UdpListen<ExtraCfg> where
ExtraCfg: RefUnwindSafe,
impl<ExtraCfg> UnwindSafe for UdpListen<ExtraCfg> where
ExtraCfg: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more