Struct jsonrpc_client_http::header::Protocol [−][src]
pub struct Protocol {
pub name: ProtocolName,
pub version: Option<String>,
}Protocols that appear in the Upgrade header field
Fields
name: ProtocolName
The protocol identifier
version: Option<String>
The optional version of the protocol, often in the format "DIGIT.DIGIT" (e.g.. "1.2")
Methods
impl Protocol[src]
impl Protocolpub fn new(name: ProtocolName, version: Option<String>) -> Protocol[src]
pub fn new(name: ProtocolName, version: Option<String>) -> ProtocolCreates a new Protocol with the given name and version
Trait Implementations
impl PartialEq<Protocol> for Protocol[src]
impl PartialEq<Protocol> for Protocolfn eq(&self, other: &Protocol) -> bool[src]
fn eq(&self, other: &Protocol) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Protocol) -> bool[src]
fn ne(&self, other: &Protocol) -> boolThis method tests for !=.
impl Clone for Protocol[src]
impl Clone for Protocolfn clone(&self) -> Protocol[src]
fn clone(&self) -> ProtocolReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl FromStr for Protocol[src]
impl FromStr for Protocoltype Err = ()
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Protocol, ()>[src]
fn from_str(s: &str) -> Result<Protocol, ()>Parses a string s to return a value of this type. Read more
impl Debug for Protocol[src]
impl Debug for Protocolfn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl Display for Protocol[src]
impl Display for Protocolfn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl Eq for Protocol[src]
impl Eq for Protocol