pub trait PlatformDevice {
type Mmio;
// Required methods
fn map_mmio_by_id(
&self,
id: u32,
) -> impl Future<Output = Result<Self::Mmio, Status>>;
fn map_mmio_by_name(
&self,
name: &str,
) -> impl Future<Output = Result<Self::Mmio, Status>>;
fn get_typed_metadata<T: Persistable + Serializable>(
&self,
) -> impl Future<Output = Result<T, Status>>;
fn get_deserialized_metadata<T: DeserializeOwned>(
&self,
) -> impl Future<Output = Result<T, Status>>;
}Expand description
PlatformDevice interface.
Required Associated Types§
Required Methods§
Sourcefn map_mmio_by_id(
&self,
id: u32,
) -> impl Future<Output = Result<Self::Mmio, Status>>
fn map_mmio_by_id( &self, id: u32, ) -> impl Future<Output = Result<Self::Mmio, Status>>
Maps an MMIO region by its id.
Sourcefn map_mmio_by_name(
&self,
name: &str,
) -> impl Future<Output = Result<Self::Mmio, Status>>
fn map_mmio_by_name( &self, name: &str, ) -> impl Future<Output = Result<Self::Mmio, Status>>
Maps MMIO memory by its name.
Sourcefn get_typed_metadata<T: Persistable + Serializable>(
&self,
) -> impl Future<Output = Result<T, Status>>
fn get_typed_metadata<T: Persistable + Serializable>( &self, ) -> impl Future<Output = Result<T, Status>>
Gets typed metadata associated with this platform device.
Sourcefn get_deserialized_metadata<T: DeserializeOwned>(
&self,
) -> impl Future<Output = Result<T, Status>>
fn get_deserialized_metadata<T: DeserializeOwned>( &self, ) -> impl Future<Output = Result<T, Status>>
Gets deserialized metadata associated with this platform device using default ID.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.