Trait AsSystemState
pub trait AsSystemState<A: Arch> {
type Output<'a>: AsRef<SystemState<A>>
where Self: 'a;
// Required method
fn as_system_state(&self) -> Self::Output<'_>;
// Provided method
fn num_memory_mappings(&self) -> usize { ... }
}
Expand description
NOTE: This value will be copied around a few times. Make sure it’s small enough!
Required Associated Types§
type Output<'a>: AsRef<SystemState<A>>
where
Self: 'a
type Output<'a>: AsRef<SystemState<A>> where Self: 'a
The output type of Self::as_system_state
.
Required Methods§
fn as_system_state(&self) -> Self::Output<'_>
fn as_system_state(&self) -> Self::Output<'_>
Returns a type that implements AsRef<SystemState<A>>
.
Should be a cheap operation, as it may be called often.
Provided Methods§
fn num_memory_mappings(&self) -> usize
fn num_memory_mappings(&self) -> usize
Returns the number of memory mappings in the state that Self::as_system_state
will return.
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.