Struct hyper::header::Protocol [] [src]

pub struct Protocol {
    pub name: ProtocolName,
    pub version: Option<String>,
}

Protocols that appear in the Upgrade header field

Fields

name

The protocol identifier

version

The optional version of the protocol, often in the format "DIGIT.DIGIT" (e.g.. "1.2")

Methods

impl Protocol

fn new(name: ProtocolName, version: Option<String>) -> Protocol

Creates a new Protocol with the given name and version

Trait Implementations

impl FromStr for Protocol

type Err = ()

fn from_str(s: &str) -> Result<Protocol, ()>

impl Display for Protocol

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl PartialEq for Protocol

fn eq(&self, arg_0: &Protocol) -> bool

fn ne(&self, arg_0: &Protocol) -> bool

impl Eq for Protocol

impl Debug for Protocol

fn fmt(&self, arg_0: &mut Formatter) -> Result

impl Clone for Protocol

fn clone(&self) -> Protocol

1.0.0fn clone_from(&mut self, source: &Self)