pub struct TimeValue(/* private fields */);Expand description
The primary time-type of the sift_stream crate. This is a flexible wrapper over the
underlying protobuf time-type that can be constructed from a variety of different time
representations.
Implementations§
Source§impl TimeValue
impl TimeValue
Sourcepub fn try_from_timestamp(secs: i64, nsecs: u32) -> Result<Self>
pub fn try_from_timestamp(secs: i64, nsecs: u32) -> Result<Self>
Creates a TimeValue from a second and nanosecond timestamp.
Sourcepub fn try_from_timestamp_millis(millis: i64) -> Result<Self>
pub fn try_from_timestamp_millis(millis: i64) -> Result<Self>
Creates a TimeValue from a millisecond timestamp.
Sourcepub fn try_from_timestamp_micros(micros: i64) -> Result<Self>
pub fn try_from_timestamp_micros(micros: i64) -> Result<Self>
Creates a TimeValue from a microsecond timestamp.
Sourcepub fn from_timestamp_nanos(nanos: i64) -> Self
pub fn from_timestamp_nanos(nanos: i64) -> Self
Creates a TimeValue from a nanosecond timestamp.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimeValue
impl RefUnwindSafe for TimeValue
impl Send for TimeValue
impl Sync for TimeValue
impl Unpin for TimeValue
impl UnwindSafe for TimeValue
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request