pub fn try_from(bytes: &[u8]) -> Result<Self, RequestError> {
        match bytes {
            b"GET" => Ok(Method::Get),
            _ => Err(RequestError::InvalidHttpMethod("Unsupported HTTP method.")),
        }
    }
/// Returns a `Method` object if the parsing of `bytes` is successful.
///
/// The method is case sensitive. A call to try_from with the input b"get" will return
/// an error, but when using the input b"GET", it returns Method::Get.
///
/// # Errors
/// Returns `RequestError` if the method specified by `bytes` is unsupported.
Returns a `Method` object if the parsing of `bytes` is successful.
The method is case sensitive. A call to try_from with the input b"get" will return
an error, but when using the input b"GET", it returns Method::Get.
Returns a ` Method ` object if the parsing of ` bytes ` is successful . The method is case sensitive . A call to try_from with the input b " get " will return an error but when using the input b " GET " it returns Method :: Get .
pub fn try_from(bytes: &[u8]) -> Result<Self, RequestError> {
        match bytes {
            b"GET" => Ok(Method::Get),
            _ => Err(RequestError::InvalidHttpMethod("Unsupported HTTP method.")),
        }
    }
pub fn try_from ( bytes : & [ u8 ] ) -> Result < Self , RequestError > { match bytes { b" " => Ok ( Method :: Get ) , _ => Err ( RequestError :: InvalidHttpMethod ( " " ) ) , } }
Returns a `Method` object if the parsing of `bytes` is successful.
Returns a ` Method ` object if the parsing of ` bytes ` is successful .
bytes
&[u8]
bytes
&[u8]
errors
Returns `RequestError` if the method specified by `bytes` is unsupported.
Returns ` RequestError ` if the method specified by ` bytes ` is unsupported .