[−][src]Struct zone_detect::Database
Zone database.
Fields
field_names: Vec<String>
Names of all the fields in the database.
notice: String
Database notice text (e.g. for licensing information).
precision: u8
Precision of the data.
table_type: TableType
Type of data (country or timezone).
version: u8
Encoding version.
Methods
impl Database
[src]
pub fn open<P: AsRef<Path>>(path: P) -> Result<Database>
[src]
Open a zone database.
pub fn from_vec(mapping: Vec<u8>) -> Result<Database>
[src]
Load the database from a byte vector.
pub fn simple_lookup(&self, location: Location) -> Option<String>
[src]
Get a simple description of a location.
For a country database this will be the country name, for the timezone database it will be the timezone ID.
pub fn lookup(&self, location: Location) -> ZoneLookup
[src]
Perform a full database lookup for a location.
Auto Trait Implementations
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,