pub struct EmbassyInstant(pub Instant);Expand description
An embassy_time::Instant that implements mdns_proto::Instant.
embassy_time::Instant and the mdns_proto::Instant trait are both foreign
here, so the orphan rule requires a newtype. The driver wraps each
Instant::now() reading; the engine is generic over the trait, so this is
the I type for the embassy path.
Tuple Fields§
§0: InstantTrait Implementations§
Source§impl Clone for EmbassyInstant
impl Clone for EmbassyInstant
Source§fn clone(&self) -> EmbassyInstant
fn clone(&self) -> EmbassyInstant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EmbassyInstant
Source§impl Debug for EmbassyInstant
impl Debug for EmbassyInstant
impl Eq for EmbassyInstant
Source§impl From<EmbassyInstant> for Instant
impl From<EmbassyInstant> for Instant
Source§fn from(wrapped: EmbassyInstant) -> Self
fn from(wrapped: EmbassyInstant) -> Self
Converts to this type from the input type.
Source§impl From<Instant> for EmbassyInstant
impl From<Instant> for EmbassyInstant
Source§fn from(raw: RawInstant) -> Self
fn from(raw: RawInstant) -> Self
Converts to this type from the input type.
Source§impl Instant for EmbassyInstant
impl Instant for EmbassyInstant
Source§fn checked_add_duration(self, dur: Duration) -> Option<Self>
fn checked_add_duration(self, dur: Duration) -> Option<Self>
Returns
self + dur, or None if the operation would overflow.Source§fn checked_duration_since(self, earlier: Self) -> Option<Duration>
fn checked_duration_since(self, earlier: Self) -> Option<Duration>
Returns
self - earlier, or None if earlier > self or the
operation would overflow.Source§impl Ord for EmbassyInstant
impl Ord for EmbassyInstant
Source§fn cmp(&self, other: &EmbassyInstant) -> Ordering
fn cmp(&self, other: &EmbassyInstant) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EmbassyInstant
impl PartialEq for EmbassyInstant
Source§fn eq(&self, other: &EmbassyInstant) -> bool
fn eq(&self, other: &EmbassyInstant) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for EmbassyInstant
impl PartialOrd for EmbassyInstant
impl StructuralPartialEq for EmbassyInstant
Auto Trait Implementations§
impl Freeze for EmbassyInstant
impl RefUnwindSafe for EmbassyInstant
impl Send for EmbassyInstant
impl Sync for EmbassyInstant
impl Unpin for EmbassyInstant
impl UnsafeUnpin for EmbassyInstant
impl UnwindSafe for EmbassyInstant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more