[][src]Struct contact_tracing::DailyTracingKey

pub struct DailyTracingKey { /* fields omitted */ }

A compact representation of contact numbers.

Methods

impl DailyTracingKey[src]

pub fn for_day(tk: &TracingKey, day: u32) -> DailyTracingKey[src]

Returns the daily tracing key for a day.

pub fn for_today(tk: &TracingKey) -> DailyTracingKey[src]

Returns the daily tracing key for today.

pub fn for_timestamp(
    tk: &TracingKey,
    timestamp: &DateTime<Utc>
) -> DailyTracingKey
[src]

Returns the daily tracing key for a timestamp.

pub fn from_bytes(b: &[u8]) -> Result<DailyTracingKey, InvalidDailyTracingKey>[src]

Creates a daily tracing key from raw bytes.

pub fn as_bytes(&self) -> &[u8][src]

Returns the bytes behind the daily tracing key

pub fn iter_rpis(&self) -> impl Iterator<Item = Rpi>[src]

Generates all RPIs for a day.

If you need the TINs too just use .enumerate().

pub fn get_rpi_for_tin(&self, tin: u8) -> Option<Rpi>[src]

Returns the RPI for a time interval number.

If the time interval is out of range this returns None

Trait Implementations

impl Clone for DailyTracingKey[src]

impl Copy for DailyTracingKey[src]

impl Debug for DailyTracingKey[src]

impl Default for DailyTracingKey[src]

impl<'de> Deserialize<'de> for DailyTracingKey[src]

impl Display for DailyTracingKey[src]

impl Eq for DailyTracingKey[src]

impl FromStr for DailyTracingKey[src]

type Err = InvalidDailyTracingKey

The associated error which can be returned from parsing.

impl Hash for DailyTracingKey[src]

impl Ord for DailyTracingKey[src]

impl PartialEq<DailyTracingKey> for DailyTracingKey[src]

impl PartialOrd<DailyTracingKey> for DailyTracingKey[src]

impl Serialize for DailyTracingKey[src]

impl StructuralEq for DailyTracingKey[src]

impl StructuralPartialEq for DailyTracingKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,