[−][src]Struct domain::rdata::rfc2845::Time48
A 48-bit Unix timestamp.
Implementations
impl Time48
[src]
pub fn now() -> Time48
[src]
Returns the timestamp of the current moment.
The funtion will panic if for whatever reason the current moment is too far in the future to fit into this type. For a correctly set clock, this will happen in December 8,921,556, so should be fine.
pub fn from_u64(value: u64) -> Self
[src]
Creates a value from a 64 bit integer.
The upper 16 bits of the arument must be zero or else this function
panics. This is also why we don’t implement From
.
pub fn into_octets(self) -> [u8; 6]
[src]
Converts a value into its wire format.
Returns the octets of the encoded value in network byte order.
pub fn eq_fudged(self, other: Self, fudge: u64) -> bool
[src]
Returns whether the time is within a given period.
Returns true
iff other
is at most fudge
seconds before or after
this value’s time.
Trait Implementations
impl Clone for Time48
[src]
impl Compose for Time48
[src]
fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>
[src]
fn compose_canonical<T: OctetsBuilder>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
[src]
&self,
target: &mut T
) -> Result<(), ShortBuf>
impl Copy for Time48
[src]
impl Debug for Time48
[src]
impl Display for Time48
[src]
impl Eq for Time48
[src]
impl From<Time48> for u64
[src]
impl Hash for Time48
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Time48
[src]
fn cmp(&self, other: &Time48) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<Ref: AsRef<[u8]>> Parse<Ref> for Time48
[src]
fn parse(parser: &mut Parser<Ref>) -> Result<Self, ParseError>
[src]
fn skip(parser: &mut Parser<Ref>) -> Result<(), ParseError>
[src]
impl PartialEq<Time48> for Time48
[src]
impl PartialOrd<Time48> for Time48
[src]
fn partial_cmp(&self, other: &Time48) -> Option<Ordering>
[src]
fn lt(&self, other: &Time48) -> bool
[src]
fn le(&self, other: &Time48) -> bool
[src]
fn gt(&self, other: &Time48) -> bool
[src]
fn ge(&self, other: &Time48) -> bool
[src]
impl StructuralEq for Time48
[src]
impl StructuralPartialEq for Time48
[src]
Auto Trait Implementations
impl RefUnwindSafe for Time48
impl Send for Time48
impl Sync for Time48
impl Unpin for Time48
impl UnwindSafe for Time48
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,