[][src]Struct ftp_client::status_code::StatusCode

pub struct StatusCode {
    pub kind: StatusCodeKind,
    pub code: u16,
}

Contains a StatusCodeKind and the corresponding code for it, this is useful on generating error messages and validity of a particular code.

Fields

kind: StatusCodeKindcode: u16

The integer representing the status code

Methods

impl StatusCode[src]

pub fn parse(text: &str) -> Self[src]

Parse a server response into a StatusCode struct.

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

Returns whether a status code number is valid.

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

Returns whether a status code number is a failure.

Trait Implementations

impl PartialEq<StatusCode> for StatusCode[src]

impl Debug for StatusCode[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[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.

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

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

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