pub struct Http3Server { /* private fields */ }Expand description
A bound QUIC listener, not yet serving.
Binding and serving are separate steps so the port can be read back before anything is accepted. That matters for the ordinary case of binding port 0 and telling something else where to connect, and it is what lets a test know the address without racing the server.
Implementations§
Source§impl Http3Server
impl Http3Server
Sourcepub fn bind(addr: SocketAddr, config: ServerConfig) -> Result<Self>
pub fn bind(addr: SocketAddr, config: ServerConfig) -> Result<Self>
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
The address actually bound, which is what resolves a port of 0.
§Errors
If the socket cannot report its address.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Http3Server
impl !UnwindSafe for Http3Server
impl Freeze for Http3Server
impl Send for Http3Server
impl Sync for Http3Server
impl Unpin for Http3Server
impl UnsafeUnpin for Http3Server
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