Trait sn0int_std::geoip::Maxmind

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

    // Provided methods
    fn cache_path(cache_dir: &Path) -> Result<PathBuf, Error> { ... }
    fn from_buf(buf: Vec<u8>) -> 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>>) -> Self

Provided Methods§

source

fn cache_path(cache_dir: &Path) -> Result<PathBuf, Error>

source

fn from_buf(buf: Vec<u8>) -> Result<Self, Error>

source

fn open(path: &Path) -> Result<Self, Error>

source

fn try_open_reader(cache_dir: &Path) -> Result<Option<MaxmindReader>, Error>

Implementors§