Trait sn0int::geoip::Maxmind

source ·
pub trait Maxmind: Sized {
    // Required methods
    fn filename() -> &'static str;
    fn new(reader: Reader<Vec<u8, Global>>) -> Self;

    // Provided methods
    fn cache_path(cache_dir: &Path) -> Result<PathBuf, Error> { ... }
    fn from_buf(buf: Vec<u8, Global>) -> Result<Self, Error> { ... }
    fn open(path: &Path) -> Result<Self, Error> { ... }
    fn try_open_reader(cache_dir: &Path) -> Result<Option<MaxmindReader>, Error> { ... }
}

Required Methods§

source

fn filename() -> &'static str

source

fn new(reader: Reader<Vec<u8, Global>>) -> Self

Provided Methods§

Implementors§