Trait hyper::proto::h1::Http1Transaction

source ·
pub(crate) trait Http1Transaction {
    type Incoming;
    type Outgoing: Default;

    const LOG: &'static str;

    // 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 Associated Constants§

source

const LOG: &'static str

Required Methods§

source

fn parse( bytes: &mut BytesMut, ctx: ParseContext<'_>, ) -> Result<Option<ParsedMessage<Self::Incoming>>, Parse>

source

fn encode(enc: Encode<'_, Self::Outgoing>, dst: &mut Vec<u8>) -> Result<Encoder>

source

fn on_error(err: &Error) -> Option<MessageHead<Self::Outgoing>>

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§