ftp_client/lib.rs
1//! This crate is my attempt at writting a FTP sync client
2//! using Rust, it should contain most commands useful to
3//! a regular client with ease of use. Additional internal
4//! functionality is also exposed to avoid limiting the user
5//! to the current implementation.
6//!
7//! Listing the files on the current working directory looks like
8//! below when using this crate:
9//! ```rust
10//! use ftp_client::prelude::*;
11//!
12//! fn main() -> Result<(), ftp_client::error::Error> {
13//! let mut client = Client::connect("test.rebex.net", "demo", "password")?;
14//! let names = client.list_names("/")?;
15//! println!("Listing names: ");
16//! for name in names {
17//! println!("{}", name);
18//! }
19//! Ok(())
20//! }
21//! ```
22//!
23#![deny(missing_docs)]
24
25pub mod client;
26pub mod error;
27pub mod status_code;
28
29/// The prelude module contains some useful default imports.
30pub mod prelude {
31 pub use crate::client::Client;
32 pub use crate::client::ClientMode;
33 pub use crate::status_code::{StatusCode, StatusCodeKind};
34}