pub(crate) trait Http1Transaction {
type Incoming;
type Outgoing: Default;
// Required methods
fn parse(
bytes: &mut BytesMut,
ctx: ParseContext<'_>,
) -> Result<Option<ParsedMessage<Self::Incoming>>, Parse>;
fn encode(
enc: Encode<'_, Self::Outgoing>,
dst: &mut Vec<u8>,
) -> Result<Encoder>;
fn on_error(err: &Error) -> Option<MessageHead<Self::Outgoing>>;
// Provided methods
fn is_client() -> bool { ... }
fn is_server() -> bool { ... }
fn should_error_on_parse_eof() -> bool { ... }
fn should_read_first() -> bool { ... }
fn update_date() { ... }
}Required Associated Types§
Required Methods§
fn parse( bytes: &mut BytesMut, ctx: ParseContext<'_>, ) -> Result<Option<ParsedMessage<Self::Incoming>>, Parse>
fn encode(enc: Encode<'_, Self::Outgoing>, dst: &mut Vec<u8>) -> Result<Encoder>
fn on_error(err: &Error) -> Option<MessageHead<Self::Outgoing>>
Provided Methods§
fn is_client() -> bool
fn is_server() -> bool
fn should_error_on_parse_eof() -> bool
fn should_read_first() -> bool
fn update_date()
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl Http1Transaction for Client
Available on crate feature client only.
impl Http1Transaction for Client
Available on crate feature
client only.