pub struct RecvStream { /* private fields */ }Expand description
A stream for receiving data using QUIC
Implementations§
Source§impl RecvStream
impl RecvStream
Sourcepub fn new(id: String, recv: RecvStream) -> Self
pub fn new(id: String, recv: RecvStream) -> Self
Creates a new RecvStream with the given ID and QUIC receive stream
§Arguments
id- Unique identifier for this streamrecv- The underlying QUIC receive stream
Sourcepub async fn recv(&self) -> Result<Bytes, Error>
pub async fn recv(&self) -> Result<Bytes, Error>
Receives the next frame from the stream
§Returns
Ok(Bytes)containing the frame payload if successfulErrif there was an error reading
Auto Trait Implementations§
impl Freeze for RecvStream
impl !RefUnwindSafe for RecvStream
impl Send for RecvStream
impl Sync for RecvStream
impl Unpin for RecvStream
impl !UnwindSafe for RecvStream
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