flep 0.2.0

File transfer protocol (FTP) library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Contains the `Server` trait.

use Credentials;
use fs::FileSystem;

/// An FTP server instance.
pub trait Server
{
    /// Gets the welcome message shown when connecting to the server.
    fn welcome_message(&self) -> String;

    /// Attempts to authenticate a user.
    fn authenticate_user(&self, _credentials: &Credentials) -> bool { true }

    fn file_system(&self) -> &FileSystem;
    fn file_system_mut(&mut self) -> &mut FileSystem;
}