[−][src]Enum brokaw::types::response_code::ResponseCode
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 u16
s.
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]
fn clone(&self) -> ResponseCode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn from(code: &ResponseCode) -> Self
[src]
impl From<Kind> for ResponseCode
[src]
impl From<ResponseCode> for u16
[src]
fn from(code: ResponseCode) -> Self
[src]
impl From<u16> for ResponseCode
[src]
impl PartialEq<ResponseCode> for ResponseCode
[src]
fn eq(&self, other: &ResponseCode) -> bool
[src]
fn ne(&self, other: &ResponseCode) -> bool
[src]
impl StructuralEq for ResponseCode
[src]
impl StructuralPartialEq for ResponseCode
[src]
Auto Trait Implementations
impl RefUnwindSafe for ResponseCode
impl Send for ResponseCode
impl Sync for ResponseCode
impl Unpin for ResponseCode
impl UnwindSafe for ResponseCode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,