[][src]Enum brokaw::types::ResponseCode

pub enum ResponseCode {
    Known(Kind),
    Unknown(u16),
}

An NNTP Response Code

This library supports all codes specified in RFC 3977.

Because proprietary NNTP extensions may define their own codes, there is no way for this library to know about all of the codes that exist. Unknown codes will be stored as u16s.

Variants

Known(Kind)

A response code implemented by the library

Unknown(u16)

A response code not known to the library

For example, a code specified by an NNTP extension might not return a known code.

Implementations

impl ResponseCode[src]

pub fn is_info(&self) -> bool[src]

The response is a 1xx

pub fn is_success(&self) -> bool[src]

The response is a 2xx

pub fn is_success_so_far(&self) -> bool[src]

The response is a 3xx

pub fn is_failure(&self) -> bool[src]

The response is a 4xx

pub fn is_error(&self) -> bool[src]

The response is a 5xx

pub fn is_multiline(&self) -> bool[src]

Returns true if the response is a Known multiline response

Unknown responses are always false

Trait Implementations

impl Clone for ResponseCode[src]

impl Copy for ResponseCode[src]

impl Debug for ResponseCode[src]

impl Display for ResponseCode[src]

impl Eq for ResponseCode[src]

impl<'_> From<&'_ ResponseCode> for u16[src]

impl From<Kind> for ResponseCode[src]

impl From<ResponseCode> for u16[src]

impl From<u16> for ResponseCode[src]

impl PartialEq<ResponseCode> for ResponseCode[src]

impl StructuralEq for ResponseCode[src]

impl StructuralPartialEq for ResponseCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.