pub struct Stream(/* private fields */);
Expand description
HTTP/2 Stream
Methods from Deref<Target = StreamRef>§
pub fn id(&self) -> StreamId
pub fn tag(&self) -> &'static str
Sourcepub fn empty_capacity(&self) -> Capacity
pub fn empty_capacity(&self) -> Capacity
Get capacity instance for current stream
Sourcepub fn send_response(
&self,
status: StatusCode,
headers: HeaderMap,
eof: bool,
) -> Result<(), OperationError>
pub fn send_response( &self, status: StatusCode, headers: HeaderMap, eof: bool, ) -> Result<(), OperationError>
Send stream response
Sourcepub async fn send_payload(
&self,
res: Bytes,
eof: bool,
) -> Result<(), OperationError>
pub async fn send_payload( &self, res: Bytes, eof: bool, ) -> Result<(), OperationError>
Send payload
Sourcepub fn send_trailers(&self, map: HeaderMap)
pub fn send_trailers(&self, map: HeaderMap)
Send client trailers and close stream
pub fn available_send_capacity(&self) -> WindowSize
pub async fn send_capacity(&self) -> Result<WindowSize, OperationError>
Sourcepub fn poll_send_capacity(
&self,
cx: &Context<'_>,
) -> Poll<Result<WindowSize, OperationError>>
pub fn poll_send_capacity( &self, cx: &Context<'_>, ) -> Poll<Result<WindowSize, OperationError>>
Check for available send capacity
Sourcepub fn poll_send_reset(
&self,
cx: &Context<'_>,
) -> Poll<Result<(), OperationError>>
pub fn poll_send_reset( &self, cx: &Context<'_>, ) -> Poll<Result<(), OperationError>>
Check if send part of stream get reset
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stream
impl !RefUnwindSafe for Stream
impl !Send for Stream
impl !Sync for Stream
impl Unpin for Stream
impl !UnwindSafe for Stream
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