pub trait TzProtocol: Clone {
    type Context;

    // Required methods
    fn get_offset_nanos_for(
        &self,
        context: &mut Self::Context
    ) -> TemporalResult<BigInt>;
    fn get_possible_instant_for(
        &self,
        context: &mut Self::Context
    ) -> TemporalResult<Vec<Instant>>;
    fn id(&self, context: &mut Self::Context) -> TemporalResult<String>;
}
Expand description

The Time Zone Protocol that must be implemented for time zones.

Required Associated Types§

source

type Context

The context passed to every method of the TzProtocol.

Required Methods§

source

fn get_offset_nanos_for( &self, context: &mut Self::Context ) -> TemporalResult<BigInt>

Get the Offset nanoseconds for this TimeZone

source

fn get_possible_instant_for( &self, context: &mut Self::Context ) -> TemporalResult<Vec<Instant>>

Get the possible Instant for this TimeZone

source

fn id(&self, context: &mut Self::Context) -> TemporalResult<String>

Get the TimeZone’s identifier.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TzProtocol for ()

Implementors§