Struct byztime::ProviderContext[][src]

pub struct ProviderContext { /* fields omitted */ }

Provides a read-write interface to a timedata file

Implementations

impl ProviderContext[src]

pub fn open(path: &Path) -> Result<ProviderContext>[src]

Opens a timedata file for read-write access.

pub fn set_offset(
    &self,
    offset: Timestamp,
    error: Timestamp,
    as_of: Timestamp
) -> Result<()>
[src]

Updates the offset and error bounds in the timedata file.

pub fn offset_quick(&self) -> Timestamp[src]

Returns the offset that was stored by the last call to set_offset.

pub fn offset_raw(&self) -> (Timestamp, Timestamp, Timestamp)[src]

Returns the (offset, error, as_of) tuple that was stored by the last call to set_offset.

pub fn update_real_offset(&self) -> Result<()>[src]

Updates the real offset (POSIX time - global time) in the timedata file.

Trait Implementations

impl Context for ProviderContext[src]

impl Drop for ProviderContext[src]

impl Send for ProviderContext[src]

impl Sync for ProviderContext[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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.