pub struct ZoneAbbrevs { /* private fields */ }Expand description
The time zone abbreviations of the timezone_abbreviations setting, sorted by the lower case abbreviation.
Implementations§
Source§impl ZoneAbbrevs
impl ZoneAbbrevs
Sourcepub fn parse(text: &str) -> Result<ZoneAbbrevs, String>
pub fn parse(text: &str) -> Result<ZoneAbbrevs, String>
Reads a file in the format of src/timezone/tznames, as ParseTzFile does. The @INCLUDE and @OVERRIDE lines are not supported.
Sourcepub fn postgres_default() -> &'static ZoneAbbrevs
pub fn postgres_default() -> &'static ZoneAbbrevs
The Default set of PostgreSQL, the default of timezone_abbreviations.
§Panics
Only if the vendored file does not parse, which the unit tests check.
Sourcepub fn get(&self, token: &str) -> Option<(&str, &Abbrev)>
pub fn get(&self, token: &str) -> Option<(&str, &Abbrev)>
The abbreviation and its meaning. Only the first 10 bytes of the token count, as in datebsearch.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &Abbrev)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &Abbrev)>
Each abbreviation in lower case and its meaning, in the order of the abbreviations.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for ZoneAbbrevs
impl Clone for ZoneAbbrevs
Source§impl Debug for ZoneAbbrevs
impl Debug for ZoneAbbrevs
Source§impl Default for ZoneAbbrevs
impl Default for ZoneAbbrevs
impl Eq for ZoneAbbrevs
Source§impl PartialEq for ZoneAbbrevs
impl PartialEq for ZoneAbbrevs
impl StructuralPartialEq for ZoneAbbrevs
Auto Trait Implementations§
impl Freeze for ZoneAbbrevs
impl RefUnwindSafe for ZoneAbbrevs
impl Send for ZoneAbbrevs
impl Sync for ZoneAbbrevs
impl Unpin for ZoneAbbrevs
impl UnsafeUnpin for ZoneAbbrevs
impl UnwindSafe for ZoneAbbrevs
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