pub(crate) struct OpaqueStreamRef {
inner: Arc<Mutex<Inner>>,
key: Key,
}
Expand description
Reference to the stream state that hides the send data chunk generic
Fields§
§inner: Arc<Mutex<Inner>>
§key: Key
Implementations§
source§impl OpaqueStreamRef
impl OpaqueStreamRef
fn new(inner: Arc<Mutex<Inner>>, stream: &mut Ptr<'_>) -> OpaqueStreamRef
sourcepub fn poll_response(
&mut self,
cx: &Context<'_>
) -> Poll<Result<Response<()>, Error>>
pub fn poll_response( &mut self, cx: &Context<'_> ) -> Poll<Result<Response<()>, Error>>
Called by a client to check for a received response.
sourcepub fn poll_pushed(
&mut self,
cx: &Context<'_>
) -> Poll<Option<Result<(Request<()>, OpaqueStreamRef), Error>>>
pub fn poll_pushed( &mut self, cx: &Context<'_> ) -> Poll<Option<Result<(Request<()>, OpaqueStreamRef), Error>>>
Called by a client to check for a pushed request.
pub fn is_end_stream(&self) -> bool
pub fn poll_data( &mut self, cx: &Context<'_> ) -> Poll<Option<Result<Bytes, Error>>>
pub fn poll_trailers( &mut self, cx: &Context<'_> ) -> Poll<Option<Result<HeaderMap, Error>>>
pub(crate) fn available_recv_capacity(&self) -> isize
pub(crate) fn used_recv_capacity(&self) -> u32
sourcepub fn release_capacity(&mut self, capacity: u32) -> Result<(), UserError>
pub fn release_capacity(&mut self, capacity: u32) -> Result<(), UserError>
Releases recv capacity back to the peer. This may result in sending WINDOW_UPDATE frames on both the stream and connection.
sourcepub(crate) fn clear_recv_buffer(&mut self)
pub(crate) fn clear_recv_buffer(&mut self)
Clear the receive queue and set the status to no longer receive data frames.
pub fn stream_id(&self) -> StreamId
Trait Implementations§
source§impl Clone for OpaqueStreamRef
impl Clone for OpaqueStreamRef
source§impl Debug for OpaqueStreamRef
impl Debug for OpaqueStreamRef
Auto Trait Implementations§
impl RefUnwindSafe for OpaqueStreamRef
impl Send for OpaqueStreamRef
impl Sync for OpaqueStreamRef
impl Unpin for OpaqueStreamRef
impl UnwindSafe for OpaqueStreamRef
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