Struct hickory_proto::quic::QuicStream
source · pub struct QuicStream { /* private fields */ }
Available on crate features
dns-over-quic
and tokio-runtime
only.Expand description
A single bi-directional stream
Implementations§
source§impl QuicStream
impl QuicStream
sourcepub async fn send(&mut self, message: Message) -> Result<(), ProtoError>
pub async fn send(&mut self, message: Message) -> Result<(), ProtoError>
Send the DNS message to the other side
sourcepub async fn send_bytes(&mut self, bytes: Bytes) -> Result<(), ProtoError>
pub async fn send_bytes(&mut self, bytes: Bytes) -> Result<(), ProtoError>
Send pre-encoded bytes, warning, QUIC requires the message id to be 0.
sourcepub async fn finish(&mut self) -> Result<(), ProtoError>
pub async fn finish(&mut self) -> Result<(), ProtoError>
finishes the send stream, i.e. there will be no more data sent to the remote
sourcepub async fn receive(&mut self) -> Result<DnsResponse, ProtoError>
pub async fn receive(&mut self) -> Result<DnsResponse, ProtoError>
Receive a single packet
sourcepub async fn receive_bytes(&mut self) -> Result<BytesMut, ProtoError>
pub async fn receive_bytes(&mut self) -> Result<BytesMut, ProtoError>
Receive a single packet as raw bytes
sourcepub fn reset(&mut self, code: DoqErrorCode) -> Result<(), ProtoError>
pub fn reset(&mut self, code: DoqErrorCode) -> Result<(), ProtoError>
Reset the sending stream due to some error
sourcepub fn stop(&mut self, code: DoqErrorCode) -> Result<(), ProtoError>
pub fn stop(&mut self, code: DoqErrorCode) -> Result<(), ProtoError>
Stop the receiving stream due to some error
Auto Trait Implementations§
impl Freeze for QuicStream
impl !RefUnwindSafe for QuicStream
impl Send for QuicStream
impl Sync for QuicStream
impl Unpin for QuicStream
impl !UnwindSafe for QuicStream
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