gftp/status
This module exposes all the “standard” error codes defined in the File transfer protocol
Types
The Status type represents the various status codes that can be returned by an FTP server.
Each variant corresponds to a specific status code defined in the FTP protocol,
categorized into different classes based on their meaning
(e.g., positive preliminary reply, positive completion reply, etc.).
pub type Status {
RestartMarker
ReadyMinute
AlreadyOpen
AboutToSend
CommandOk
CommandNotImplemented
System
Directory
File
Help
Name
Ready
Closing
DataConnectionOpen
ClosingDataConnection
PassiveMode
LongPassiveMode
ExtendedPassiveMode
LoggedIn
LoggedOut
LogoutAck
AuthOk
RequestedFileActionOk
PathCreated
NeedPassword
LoginNeedAccount
RequestFilePending
NotAvailable
CannotOpenDataConnection
TransferAborted
InvalidCredentials
HostUnavailable
RequestFileActionIgnored
ActionAborted
RequestedActionNotTaken
BadCommand
BadArguments
NotImplemented
BadSequence
NotImplementedParameter
NotLoggedIn
StoringNeedAccount
FileUnavailable
PageTypeUnknown
ExceededStorage
BadFilename
Unknown(Int)
}
Constructors
-
RestartMarker -
ReadyMinute -
AlreadyOpen -
AboutToSend -
CommandOk -
CommandNotImplemented -
System -
Directory -
File -
Help -
Name -
Ready -
Closing -
DataConnectionOpen -
ClosingDataConnection -
PassiveMode -
LongPassiveMode -
ExtendedPassiveMode -
LoggedIn -
LoggedOut -
LogoutAck -
AuthOk -
RequestedFileActionOk -
PathCreated -
NeedPassword -
LoginNeedAccount -
RequestFilePending -
NotAvailable -
CannotOpenDataConnection -
TransferAborted -
InvalidCredentials -
HostUnavailable -
RequestFileActionIgnored -
ActionAborted -
RequestedActionNotTaken -
BadCommand -
BadArguments -
NotImplemented -
BadSequence -
NotImplementedParameter -
NotLoggedIn -
StoringNeedAccount -
FileUnavailable -
PageTypeUnknown -
ExceededStorage -
BadFilename -
Unknown(Int)
Values
pub fn describe(status: Status) -> String
Converts a status code to its descriptive string representation. This is useful for logging and debugging purposes.
pub fn from_int(code: Int) -> Status
Converts an integer status code to its corresponding Status variant. If the code is not recognized, it returns Unknown.