pub struct Finder { /* private fields */ }
Expand description
Finder use a fine tuned Ray casting algorithm implement geometry-rs which is Rust port of geometry by Josh Baker.
Implementations
sourceimpl Finder
impl Finder
sourcepub fn from_pb(tzs: Timezones) -> Finder
pub fn from_pb(tzs: Timezones) -> Finder
from_pb
is used when you can customed timezone data, as long as
it’s compatible with Proto’s desc.
sourcepub fn new() -> Finder
pub fn new() -> Finder
new is for most general usacase.
Example:
use tzf_rs::Finder;
let finder = Finder::new();
sourcepub fn get_tz_name(&self, lng: f64, lat: f64) -> &str
pub fn get_tz_name(&self, lng: f64, lat: f64) -> &str
Example:
use tzf_rs::Finder;
let finder = Finder::new();
assert_eq!("Asia/Shanghai", finder.get_tz_name(116.3883, 39.9289));
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Finder
impl Send for Finder
impl Sync for Finder
impl Unpin for Finder
impl UnwindSafe for Finder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more