cftp 0.1.0

A small, fast and highly customizable FTP server library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::{convert::Infallible, str::FromStr};

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct User {
    pub username: String,
}

impl FromStr for User {
    type Err = Infallible;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        Ok(Self {
            username: s.trim().to_string(),
        })
    }
}