Trait h2::proto::peer::Peer

source ·
pub(crate) trait Peer {
    type Poll: Debug;

    const NAME: &'static str;

    // Required methods
    fn dyn() -> Dyn;
    fn convert_poll_message(
        pseudo: Pseudo,
        fields: HeaderMap,
        stream_id: StreamId,
    ) -> Result<Self::Poll, Error>;
}
Expand description

Either a Client or a Server

Required Associated Types§

source

type Poll: Debug

Message type polled from the transport

Required Associated Constants§

source

const NAME: &'static str

Required Methods§

source

fn dyn() -> Dyn

source

fn convert_poll_message( pseudo: Pseudo, fields: HeaderMap, stream_id: StreamId, ) -> Result<Self::Poll, Error>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Peer for h2::client::Peer

source§

type Poll = Response<()>

source§

const NAME: &'static str = "Client"

source§

impl Peer for h2::server::Peer

source§

type Poll = Request<()>

source§

const NAME: &'static str = "Server"