-
-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Description
As I was working on a commercial project using suppaftp, I faced various challenges:
- lack of support for
Dropon ftp- and data- streams, - lack of
Send, which is a WIP`, - lack of integration with
serde, - lack of support for implementing retry logic in case of connectivity issues,
- private visibility of important traits, notably
TlsStream, - rigidity of the APIs, notably
ImplFtpStream::listreturns aFtpResult<Vec<String>>instead of an iterator over results, - lack of an iterator over
std::list::Fileon a remote server, - lack of
RemotePathBufandRemotePath(though it goes beyond the scope of your crate), - lack of a canonical method for file synchronization (think of comparing the state of the remote server against an "index" and applying changes to the local replica of the file hierarchy).
Thanks to your crate, I was spared from a lot of work, so I thank you for that. However, the library right now is fairly low level and does not offer many conveniences that one could expect.
For now, my biggest annoyance is the ImplFtpStream::list method, which probably shouldn't have existed in this form.
When implementing an iterator over remote entries, I have to deal with a Vec<Vec<Result<MyCustomDirEntryType, MyCustomWrapperAroundParseError>>.
And due to the nature of the iterator, I ended up facing the limitations of the NLL borrow checker (danielhenrymantilla/polonius-the-crab.rs#11) and I had to deal with the absence of entry API on vector until the pain became so severe that I ended up implementing entry API for Vec as a stack (link).
Without your library, I would have to write FTP client code myself, so again, thank you.
Changes
The most important changes are the following:
- Add a method on FTP streams that returns an iterator over results to allow users to choose the container.
- Add a feature that would enable serialization and deserialization of
suppaftp::list::File,suppaftp::list::ParseError, andsuppaftp::types::FtpError.