pub struct SystemClock { /* private fields */ }
Expand description

A clock that uses the operating system’s clock

Implementations§

source§

impl SystemClock

source

pub fn new() -> Self

Creates a new system clock

Trait Implementations§

source§

impl Clock for SystemClock

§

type Instant = Microseconds64

The type of instant that this clock produces
source§

fn now(&mut self) -> Self::Instant

Returns the current time
source§

impl Clone for SystemClock

source§

fn clone(&self) -> SystemClock

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SystemClock

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SystemClock

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl ReceiveDriver<SystemClock> for LinuxCan

§

type Error = Error

The error type
source§

fn receive( &mut self, clock: &mut SystemClock ) -> Result<Frame<Microseconds64>, Self::Error>

Attempts to receive a frame without blocking
source§

fn apply_filters<S>(&mut self, local_node: Option<CanNodeId>, subscriptions: S)where S: IntoIterator<Item = Subscription>,

Sets up frame reception filters to accept only frames matching the provided subscriptions Read more
source§

fn apply_accept_all(&mut self)

Sets up frame reception filters to accept all incoming frames
source§

impl TransmitDriver<SystemClock> for LinuxCan

§

type Error = Error

The error type
source§

fn try_reserve(&mut self, _frames: usize) -> Result<(), OutOfMemoryError>

Attempts to reserve space to transmit frames additional frames Read more
source§

fn transmit( &mut self, frame: Frame<Microseconds64>, clock: &mut SystemClock ) -> Result<Option<Frame<Microseconds64>>, Self::Error>

Attempts to send a frame without blocking Read more
source§

fn flush(&mut self, _clock: &mut SystemClock) -> Result<(), Self::Error>

Attempts to flush all frames out of any in-memory queues that may exist and transmit them

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Err = <U as TryFrom<T>>::Err

§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>