pub struct DefaultFinder { /* private fields */ }
Expand description
It’s most recommend to use, combine both Finder
and FuzzyFinder
,
if FuzzyFinder
got no data, then use Finder
.
Implementations§
Source§impl DefaultFinder
impl DefaultFinder
Sourcepub fn get_tz_name(&self, lng: f64, lat: f64) -> &str
pub fn get_tz_name(&self, lng: f64, lat: f64) -> &str
use tzf_rs::DefaultFinder;
let finder = DefaultFinder::new();
assert_eq!("Asia/Shanghai", finder.get_tz_name(116.3883, 39.9289));
Sourcepub fn get_tz_names(&self, lng: f64, lat: f64) -> Vec<&str>
pub fn get_tz_names(&self, lng: f64, lat: f64) -> Vec<&str>
use tzf_rs::DefaultFinder;
let finder = DefaultFinder::new();
println!("{:?}", finder.get_tz_names(116.3883, 39.9289));
Sourcepub fn timezonenames(&self) -> Vec<&str>
pub fn timezonenames(&self) -> Vec<&str>
Returns all time zone names as a Vec<&str>
.
use tzf_rs::DefaultFinder;
let finder = DefaultFinder::new();
println!("{:?}", finder.timezonenames());
Sourcepub fn data_version(&self) -> &str
pub fn data_version(&self) -> &str
Returns the version of the data used by this DefaultFinder
as a &str
.
Example:
use tzf_rs::DefaultFinder;
let finder = DefaultFinder::new();
println!("{:?}", finder.data_version());
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DefaultFinder
impl RefUnwindSafe for DefaultFinder
impl Send for DefaultFinder
impl Sync for DefaultFinder
impl Unpin for DefaultFinder
impl UnwindSafe for DefaultFinder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more