RtcGoldfish

Struct RtcGoldfish 

Source
pub struct RtcGoldfish {
    base: usize,
}

Fields§

§base: usize

Trait Implementations§

Source§

impl Driver for RtcGoldfish

Source§

fn try_handle_interrupt(&self, irq: Option<usize>) -> bool

Source§

fn device_type(&self) -> DeviceType

Source§

fn get_id(&self) -> String

Source§

fn as_rtc(&self) -> Option<&dyn RtcDriver>

将驱动程序转换为实时时钟驱动程序(如果适用)
Source§

fn as_net(&self) -> Option<&dyn NetDevice>

将驱动程序转换为网络驱动程序(如果适用)
Source§

fn as_net_arc(self: Arc<Self>) -> Option<Arc<dyn NetDevice>>

将驱动程序转换为网络驱动程序 Arc(如果适用)
Source§

fn as_block(&self) -> Option<&dyn BlockDriver>

将驱动程序转换为块设备驱动程序(如果适用)
Source§

fn as_block_arc(self: Arc<Self>) -> Option<Arc<dyn BlockDriver>>

将驱动程序转换为块设备驱动程序 Arc(如果适用)
Source§

fn as_rtc_arc(self: Arc<Self>) -> Option<Arc<dyn RtcDriver>>

将驱动程序转换为实时时钟驱动程序 Arc(如果适用)
Source§

fn as_serial(&self) -> Option<&dyn SerialDriver>

将驱动程序转换为串口驱动程序(如果适用)
Source§

impl RtcDriver for RtcGoldfish

Source§

fn read_epoch(&self) -> u64

读取自纪元以来的秒数
Source§

fn read_datetime(&self) -> DateTime

读取日期时间(北京时间,默认实现)

Auto Trait Implementations§

§

impl Freeze for RtcGoldfish

§

impl RefUnwindSafe for RtcGoldfish

§

impl Send for RtcGoldfish

§

impl Sync for RtcGoldfish

§

impl Unpin for RtcGoldfish

§

impl UnwindSafe for RtcGoldfish

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where 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>

Performs the conversion.