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, path::PathBuf, str::FromStr};

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Stor {
    pub file: PathBuf,
}

impl FromStr for Stor {
    type Err = Infallible;

    fn from_str(file: &str) -> Result<Self, Self::Err> {
        Ok(Self {
            file: PathBuf::from(file.replace("\\", "/")),
        })
    }
}