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 Rnto {
    pub to: PathBuf,
}

impl FromStr for Rnto {
    type Err = Infallible;

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