pub struct Server {
pub listen: SocketAddr,
pub cert: PathBuf,
pub key: PathBuf,
pub alpn: Vec<String>,
pub shutdown_grace: u64,
}Expand description
[server] — the QUIC listener and its TLS identity.
Fields§
§listen: SocketAddrUDP socket address to listen on, e.g. "0.0.0.0:443".
cert: PathBufPEM file holding the certificate chain (leaf first).
key: PathBufPEM file holding the private key (PKCS#8, PKCS#1 or SEC1).
alpn: Vec<String>ALPN identifiers to advertise, in preference order.
shutdown_grace: u64Seconds to let existing tunnels finish after SIGTERM, at most an hour.
Zero closes everything at once. The wait ends early if all tunnels finish sooner, so a generous value costs nothing in the common case — but it is a bound rather than a wish, which is why it has a ceiling of its own.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Server
impl<'de> Deserialize<'de> for Server
Source§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
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
impl UnwindSafe for Server
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