pub struct Connection {}Expand description
A QUIC connection.
Implementations§
Source§impl Connection
impl Connection
Sourcepub async fn open_bi(&self) -> Result<(SendStream, RecvStream)>
pub async fn open_bi(&self) -> Result<(SendStream, RecvStream)>
Opens a bidirectional stream.
Sourcepub async fn open_uni(&self) -> Result<SendStream>
pub async fn open_uni(&self) -> Result<SendStream>
Opens a unidirectional stream.
Sourcepub async fn accept_bi(&self) -> Result<(SendStream, RecvStream)>
pub async fn accept_bi(&self) -> Result<(SendStream, RecvStream)>
Accepts an incoming bidirectional stream.
Sourcepub async fn accept_uni(&self) -> Result<RecvStream>
pub async fn accept_uni(&self) -> Result<RecvStream>
Accepts an incoming unidirectional stream.
Sourcepub async fn send_datagram(&self, _data: Bytes) -> Result<()>
pub async fn send_datagram(&self, _data: Bytes) -> Result<()>
Sends a datagram over the connection.
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
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