Skip to main content

DateTime

Trait DateTime 

Source
pub trait DateTime<'a> {
    // Required methods
    fn get_date_time(&self) -> Result<(), ErrorCode>;
    fn set_date_time(&self, date_time: DateTimeValues) -> Result<(), ErrorCode>;
    fn set_client(&self, client: &'a dyn DateTimeClient);
}
Expand description

Interface for reading and setting the current time

Required Methods§

Source

fn get_date_time(&self) -> Result<(), ErrorCode>

Request driver to return date and time

When successful, this function will be followed by the callback callback_get_date which provides the actual date and time or an error.

Source

fn set_date_time(&self, date_time: DateTimeValues) -> Result<(), ErrorCode>

Sets the current date and time

When successful this function call must be followed by a call to callback_set_date.

Source

fn set_client(&self, client: &'a dyn DateTimeClient)

Sets a client that calls the callback function when date and time is requested

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§