pub struct Endpoint { /* private fields */ }Expand description
A QUIC endpoint.
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub async fn bind(addr: SocketAddr) -> Result<Self>
pub async fn bind(addr: SocketAddr) -> Result<Self>
Creates a new endpoint. Binds the endpoint to a local socket address.
Sourcepub async fn server(
server_config: ServerConfig,
addr: SocketAddr,
) -> Result<Self>
pub async fn server( server_config: ServerConfig, addr: SocketAddr, ) -> Result<Self>
Binds a server endpoint using the supplied TLS and transport settings.
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
Returns the address the operating system assigned to this endpoint.
Sourcepub fn server_config(&self) -> Option<&ServerConfig>
pub fn server_config(&self) -> Option<&ServerConfig>
Returns this endpoint’s server configuration, if it is a server.
Sourcepub async fn connect(
&self,
_addr: SocketAddr,
_server_name: &str,
) -> Result<Connecting>
pub async fn connect( &self, _addr: SocketAddr, _server_name: &str, ) -> Result<Connecting>
Connects to a remote endpoint.
Auto Trait Implementations§
impl !RefUnwindSafe for Endpoint
impl !UnwindSafe for Endpoint
impl Freeze for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
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