httpbis 0.9.1

Rust implementation of HTTP/2 protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::error;
use crate::result;
use crate::ErrorCode;
use crate::Headers;
use bytes::Bytes;

/// Synchronous callback of incoming data
pub(crate) trait StreamHandlerInternal: Send + 'static {
    /// DATA frame received
    fn data_frame(&mut self, data: Bytes, end_stream: bool) -> result::Result<()>;
    /// Trailers HEADERS received
    fn trailers(&mut self, trailers: Headers) -> result::Result<()>;
    /// RST_STREAM frame received
    fn rst(self, error_code: ErrorCode) -> result::Result<()>;
    /// Any other error
    fn error(self, error: error::Error) -> result::Result<()>;
}