pub trait PlatformDevice {
type Mmio;
// Required methods
fn map_mmio_by_id(
&self,
id: u32,
) -> impl Future<Output = Result<Self::Mmio, DriverError>>;
fn map_mmio_by_name(
&self,
name: &str,
) -> impl Future<Output = Result<Self::Mmio, DriverError>>;
fn get_typed_metadata<T: Persistable + Serializable>(
&self,
) -> impl Future<Output = Result<T, DriverError>>;
fn get_deserialized_metadata<T: DeserializeOwned>(
&self,
) -> impl Future<Output = Result<T, DriverError>>;
}Expand description
PlatformDevice interface.
Required Associated Types§
Required Methods§
Sourcefn map_mmio_by_id(
&self,
id: u32,
) -> impl Future<Output = Result<Self::Mmio, DriverError>>
fn map_mmio_by_id( &self, id: u32, ) -> impl Future<Output = Result<Self::Mmio, DriverError>>
Maps an MMIO region by its id.
Sourcefn map_mmio_by_name(
&self,
name: &str,
) -> impl Future<Output = Result<Self::Mmio, DriverError>>
fn map_mmio_by_name( &self, name: &str, ) -> impl Future<Output = Result<Self::Mmio, DriverError>>
Maps MMIO memory by its name.
Sourcefn get_typed_metadata<T: Persistable + Serializable>(
&self,
) -> impl Future<Output = Result<T, DriverError>>
fn get_typed_metadata<T: Persistable + Serializable>( &self, ) -> impl Future<Output = Result<T, DriverError>>
Gets typed metadata associated with this platform device.
Sourcefn get_deserialized_metadata<T: DeserializeOwned>(
&self,
) -> impl Future<Output = Result<T, DriverError>>
fn get_deserialized_metadata<T: DeserializeOwned>( &self, ) -> impl Future<Output = Result<T, DriverError>>
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".