pub enum PeerSendStream {
Plain(SendStream),
Encrypted(CryptoSendStream),
}Variants§
Plain(SendStream)
Encrypted(CryptoSendStream)
Implementations§
Source§impl PeerSendStream
impl PeerSendStream
pub fn plain(inner: SendStream) -> Self
pub fn encrypted(inner: SendStream, key: [u8; 32]) -> Self
pub fn is_encrypted(&self) -> bool
pub async fn write_all(&mut self, buf: &[u8]) -> Result<()>
pub async fn flush(&mut self) -> Result<()>
pub fn finish(self) -> Result<()>
Sourcepub async fn finish_and_wait_for_peer(self, timeout: Duration) -> Result<()>
pub async fn finish_and_wait_for_peer(self, timeout: Duration) -> Result<()>
Finish a short control response and keep its QUIC send half alive until
the peer has acknowledged the buffered bytes (or the bounded wait
expires). finish() alone only queues the FIN; a concurrent physical-leg
replacement can otherwise close the connection before the verdict is
observable by the admission dialer.
pub fn into_plain(self) -> SendStream
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PeerSendStream
impl !UnwindSafe for PeerSendStream
impl Freeze for PeerSendStream
impl Send for PeerSendStream
impl Sync for PeerSendStream
impl Unpin for PeerSendStream
impl UnsafeUnpin for PeerSendStream
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