Skip to main content

Dataset

Enum Dataset 

Source
#[repr(u8)]
pub enum Dataset { Now = 0, Since1970 = 1, All = 2, NowLandOnly = 4, Since1970LandOnly = 5, AllLandOnly = 6, }
Expand description

The dataset an asset was built from, naming a timezone-boundary-builder release as a zone set × ocean coverage pair. The zone set trades zone count for historical fidelity: now and 1970 merge zones whose rules are identical since that date, and all keeps every distinct tzid. Ocean coverage decides whether maritime timezones tile the rest of the planet or queries at sea return None. (The discriminants keep the wire bitfield: the zone set lives in bits 0–1, and a set bit 2 means land-only.)

Variants§

§

Now = 0

Zones whose rules are identical from today onward are merged and the oceans are covered. This is the smallest set, and the preset default.

§

Since1970 = 1

Zones identical since 1970 are merged and the oceans are covered, which is enough to resolve any post-1970 civil time correctly.

§

All = 2

Every distinct tzid is kept and the oceans are covered, giving full historical fidelity; this is the largest set.

§

NowLandOnly = 4

This is Now without maritime zones, so queries at sea return None.

§

Since1970LandOnly = 5

This is Since1970 without maritime zones.

§

AllLandOnly = 6

This is All without maritime zones.

Implementations§

Source§

impl Dataset

Source

pub const fn name(self) -> &'static str

Returns the canonical dataset name (now, 1970, or all, with a land- prefix for the land-only variants), the spelling the builder’s dataset parser accepts.

Source

pub const fn zone_set(self) -> &'static str

The zone-set half of the name ("now", "1970", or "all"), which picks how aggressively zones with identical rules are merged.

Source

pub const fn oceans(self) -> bool

Whether maritime timezones cover the oceans (false names the land- releases).

Source

pub fn from_name(name: &str) -> Option<Dataset>

The dataset a name selects ([land-]now|1970|all; full and comprehensive, TZBB’s own word for the unsuffixed release, are accepted for all). This is the inverse of name(), kept beside it so the two spellings cannot drift apart.

Source

pub const fn from_byte(byte: u8) -> Option<Dataset>

The dataset a header byte names, if any.

Trait Implementations§

Source§

impl Clone for Dataset

Source§

fn clone(&self) -> Dataset

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Dataset

Source§

impl Debug for Dataset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for Dataset

Source§

impl PartialEq for Dataset

Source§

fn eq(&self, other: &Dataset) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Dataset

Source§

impl<'a> TryFromCtx<'a, Endian> for Dataset

Source§

type Error = Error

Source§

fn try_from_ctx( src: &'a [u8], ctx: Endian, ) -> Result<(Dataset, usize), <Dataset as TryFromCtx<'a, Endian>>::Error>

Source§

impl TryIntoCtx<Endian> for &Dataset

Source§

type Error = Error

Source§

fn try_into_ctx( self, dst: &mut [u8], ctx: Endian, ) -> Result<usize, <&Dataset as TryIntoCtx<Endian>>::Error>

Source§

impl TryIntoCtx<Endian> for Dataset

Source§

type Error = Error

Source§

fn try_into_ctx( self, dst: &mut [u8], ctx: Endian, ) -> Result<usize, <Dataset as TryIntoCtx<Endian>>::Error>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.