[][src]Enum brokaw::types::Kind

#[repr(u16)]pub enum Kind {
    Help,
    Capabilities,
    Date,
    PostingAllowed,
    PostingProhibited,
    ConnectionClosing,
    GroupSelected,
    List,
    Article,
    Head,
    Body,
    ArticleExists,
    Overview,
    ArticleTransferredOk,
    IHaveSendArticle,
    PostSendArticle,
    TemporarilyUnavailable,
    WrongMode,
    InternalError,
    NoSuchNewsgroup,
    NoNewsgroupSelected,
    InvalidCurrentArticleNumber,
    NoNextArticle,
    NoPreviousArticle,
    NoArticleWithNumber,
    NoArticleWithMessageId,
    ArticleNotWanted,
    TransferFailed,
    TransferRejected,
    PostingNotPermitted,
    PostingFailed,
    AuthenticationRequired,
    SecureConnectionRequired,
    UnknownCommand,
    SyntaxError,
    PermanentlyUnavailable,
    FeatureNotSupported,
    Base64Error,
    AuthenticationAccepted,
    PasswordRequired,
    AuthenticationFailed,
    AuthenticationOutOfSequence,
}

Variants

Help
Capabilities
Date
PostingAllowed
PostingProhibited
ConnectionClosing
GroupSelected

This is generated by GROUP and LISTGROUP and the bodies are different depending on which command is used. Buyer beware!

List
Article
Head
Body
ArticleExists
Overview
ArticleTransferredOk
IHaveSendArticle
PostSendArticle
TemporarilyUnavailable
WrongMode
InternalError
NoSuchNewsgroup
NoNewsgroupSelected
InvalidCurrentArticleNumber
NoNextArticle
NoPreviousArticle
NoArticleWithNumber
NoArticleWithMessageId
ArticleNotWanted
TransferFailed
TransferRejected
PostingNotPermitted
PostingFailed
AuthenticationRequired
SecureConnectionRequired
UnknownCommand
SyntaxError
PermanentlyUnavailable
FeatureNotSupported
Base64Error
AuthenticationAccepted
PasswordRequired
AuthenticationFailed
AuthenticationOutOfSequence

Implementations

impl Kind[src]

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

Whether or not the code corresponds to a multiline response

NNTP requires that extension makers specify whether a response code corresponds to a single-line or multi-line response.

With the exception of code 211, this means that the response code reliably tells you whether or not there is a data block section for a response.

Response Code 211

Per RFC 3977, due to "historical reasons", Response Code 211 corresponds to a multi-line response when returned from LISTGROUP and a single-line response when returned by the GROUP command.

Rather than making the entire library more complex for this singular exception, the library assumes that code 211 DOES NOT correspond to a multi-line response.

Trait Implementations

impl Clone for Kind[src]

impl Copy for Kind[src]

impl Debug for Kind[src]

impl Eq for Kind[src]

impl From<Kind> for u16[src]

impl From<Kind> for ResponseCode[src]

impl PartialEq<Kind> for Kind[src]

impl StructuralEq for Kind[src]

impl StructuralPartialEq for Kind[src]

impl TryFrom<u16> for Kind[src]

type Error = TryFromPrimitiveError<Self>

The type returned in the event of a conversion error.

impl TryFromPrimitive for Kind[src]

type Primitive = u16

Auto Trait Implementations

impl RefUnwindSafe for Kind

impl Send for Kind

impl Sync for Kind

impl Unpin for Kind

impl UnwindSafe for Kind

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, 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.