Struct tzf_rs::FuzzyFinder

source ·
pub struct FuzzyFinder { /* private fields */ }
Expand description

FuzzyFinder store all preindex’s tiles data in a HashMap, It iterate all zoom levels for input’s longitude and latitude to build map key to to check if in map.

It’s is very fast and use about 400ns to check if has preindex. It work for most places on earch and here is a quick loop of preindex data:

Implementations

use tzf_rs::FuzzyFinder;

let finder = FuzzyFinder::new();

Example:

use tzf_rs::FuzzyFinder;

let finder = FuzzyFinder::new();
assert_eq!("Asia/Shanghai", finder.get_tz_name(116.3883, 39.9289));

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.