Enum CommandKind

Source
pub enum CommandKind {
Show 61 variants ABOR(ABOR), ACCT(ACCT), ADAT(ADAT), ALLO(ALLO), APPE(APPE), AUTH(AUTH), CCC(CCC), CDUP(CDUP), CONF(CONF), CWD(CWD), DELE(DELE), ENC(ENC), EPRT(EPRT), EPSV(EPSV), FEAT(FEAT), HELP(HELP), HOST(HOST), LANG(LANG), LIST(LIST), LPRT(LPRT), LPSV(LPSV), MDTM(MDTM), MIC(MIC), MKD(MKD), MLSD(MLSD), MLST(MLST), MODE(MODE), NLST(NLST), NOOP(NOOP), OPTS(OPTS), PASS(PASS), PASV(PASV), PBSZ(PBSZ), PORT(PORT), PROT(PROT), PWD(PWD), QUIT(QUIT), REIN(REIN), REST(REST), RETR(RETR), RMD(RMD), RNFR(RNFR), RNTO(RNTO), SITE(SITE), SIZE(SIZE), SMNT(SMNT), STAT(STAT), STOR(STOR), STOU(STOU), STRU(STRU), SYST(SYST), TYPE(TYPE), USER(USER), XCUP(XCUP), XMKD(XMKD), XPWD(XPWD), XRCP(XRCP), XRMD(XRMD), XRSQ(XRSQ), XSEM(XSEM), XSEN(XSEN),
}

Variants§

§

ABOR(ABOR)

Abort an active file transfer.

§

ACCT(ACCT)

Account information.

§

ADAT(ADAT)

Authentication/Security Data.

§

ALLO(ALLO)

Allocate sufficient disk space to receive a file.

§

APPE(APPE)

Append.

§

AUTH(AUTH)

Authentication/Security Mechanism.

§

CCC(CCC)

Clear Command Channel.

§

CDUP(CDUP)

Change directory up one level.

§

CONF(CONF)

Confidentiality Protection Command.

§

CWD(CWD)

Change working directory.

§

DELE(DELE)

Delete file.

§

ENC(ENC)

Privacy Protected Channel.

§

EPRT(EPRT)

Specifies an extended address and port to which the server should connect.

§

EPSV(EPSV)

Enter extended passive mode.

§

FEAT(FEAT)

Get the feature list implemented by the server.

§

HELP(HELP)

Returns usage documentation on a command if specified, else a general help document is returned.

§

HOST(HOST)

Identify desired virtual host on server, by name.

§

LANG(LANG)

Language Negotiation.

§

LIST(LIST)

Returns information of a file or directory if specified, else information of the current working directory is returned.

§

LPRT(LPRT)

Specifies a long address and port to which the server should connect.

§

LPSV(LPSV)

Enter long passive mode.

§

MDTM(MDTM)

Return the last-modified time of a specified file.

§

MIC(MIC)

Integrity Protected Command.

§

MKD(MKD)

Make directory.

§

MLSD(MLSD)

Lists the contents of a directory if a directory is named.

§

MLST(MLST)

Provides data about exactly the object named on its command line, and no others.

§

MODE(MODE)

Sets the transfer mode.

§

NLST(NLST)

Returns a list of file names in a specified directory.

§

NOOP(NOOP)

A no-operation.

§

OPTS(OPTS)

Select options for a feature.

§

PASS(PASS)

Authentication password.

§

PASV(PASV)

Enter passive mode.

§

PBSZ(PBSZ)

Protection Buffer Size.

§

PORT(PORT)

Specifies an address and port to which the server should connect.

§

PROT(PROT)

Data Channel Protection Level.

§

PWD(PWD)

Gets the name of the current working directory on the remote host.

§

QUIT(QUIT)

Terminates the command connection.

§

REIN(REIN)

Reinitializes the command connection.

§

REST(REST)

Restart transfer from the specified point.

§

RETR(RETR)

Retrieve a copy of the file.

§

RMD(RMD)

Remove a directory.

§

RNFR(RNFR)

Rename from.

§

RNTO(RNTO)

Rename to.

§

SITE(SITE)

Sends site specific commands to remote server.

§

SIZE(SIZE)

Return the size of a file.

§

SMNT(SMNT)

Mount file structure.

§

STAT(STAT)

Returns the current status.

§

STOR(STOR)

Accept the data and to store the data as a file at the server site.

§

STOU(STOU)

Store file uniquely.

§

STRU(STRU)

Set file transfer structure.

§

SYST(SYST)

Returns a word identifying the system.

§

TYPE(TYPE)

Sets the transfer mode (ASCII/binary).

§

USER(USER)

Sets the name for the user.

§

XCUP(XCUP)

Change to the parent of the current working directory.

§

XMKD(XMKD)

Make a directory.

§

XPWD(XPWD)

Print the current working directory.

§

XRCP(XRCP)

§

XRMD(XRMD)

Remove the directory.

§

XRSQ(XRSQ)

§

XSEM(XSEM)

Send, mail if cannot.

§

XSEN(XSEN)

Send to terminal.

Implementations§

Source§

impl CommandKind

Source

pub fn read(read: &mut dyn Read) -> Result<Self, Error>

Reads a command from a buffer.

Source

pub fn command_name(&self) -> &'static str

Trait Implementations§

Source§

impl Clone for CommandKind

Source§

fn clone(&self) -> CommandKind

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CommandKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CommandKind

Source§

fn eq(&self, other: &CommandKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for CommandKind

Source§

impl StructuralPartialEq for CommandKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.