Struct protocol_ftp_client::FtpReceiver [] [src]

pub struct FtpReceiver {
    // some fields omitted
}

"Passive" side of FTP protocol, which mean that receiver expects some data from remote server. As soon as it receives enough data it can "advance" to transmitter state, i.e. fill buffer with commands to be further sent to the remote server.

Methods

impl FtpReceiver
[src]

Try to consume Receiver by parsing buffer and advance into Transmitter. In the case of an error, it returns unmodified Receiver as the error. The actually happened error can be obtained via take_error.

In case of success it remembers the last successful state, probably switches it and returns Transmitter object.

Returns tha last occurred error, and internally sets up None.

Sometimes you need to manually advance to Transmitter e.g. in case of Authorization Error, you can re-send other credentials.