Struct byztime::ProviderContext [−][src]
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]
&self,
offset: Timestamp,
error: Timestamp,
as_of: Timestamp
) -> Result<()>
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]
fn as_mut_ptr(&self) -> *mut byztime_ctx
[src]
fn close(self) -> Result<()>
[src]
fn offset(&self) -> Result<(Timestamp, Timestamp, Timestamp)>
[src]
fn global_time(&self) -> Result<(Timestamp, Timestamp, Timestamp)>
[src]
fn get_drift(&self) -> i64
[src]
fn set_drift(&self, drift_ppb: i64)
[src]
fn slew(
&self,
min_rate_ppb: i64,
max_rate_ppb: i64,
max_error: Option<Timestamp>
) -> Result<()>
[src]
&self,
min_rate_ppb: i64,
max_rate_ppb: i64,
max_error: Option<Timestamp>
) -> Result<()>
fn step(&self) -> Result<()>
[src]
impl Drop for ProviderContext
[src]
impl Send for ProviderContext
[src]
impl Sync for ProviderContext
[src]
Auto Trait Implementations
impl RefUnwindSafe for ProviderContext
impl Unpin for ProviderContext
impl UnwindSafe for ProviderContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,