flep/server/
server.rs

1//! Contains the `Server` trait.
2
3use Credentials;
4use fs::FileSystem;
5
6/// An FTP server instance.
7pub trait Server
8{
9    /// Gets the welcome message shown when connecting to the server.
10    fn welcome_message(&self) -> String;
11
12    /// Attempts to authenticate a user.
13    fn authenticate_user(&self, _credentials: &Credentials) -> bool { true }
14
15    fn file_system(&self) -> &FileSystem;
16    fn file_system_mut(&mut self) -> &mut FileSystem;
17}
18