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§
Sourcefn get_date_time(&self) -> Result<(), ErrorCode>
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.
Sourcefn set_date_time(&self, date_time: DateTimeValues) -> Result<(), ErrorCode>
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
.
Sourcefn set_client(&self, client: &'a dyn DateTimeClient)
fn set_client(&self, client: &'a dyn DateTimeClient)
Sets a client that calls the callback function when date and time is requested