liblisa::state

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

The output type of Self::as_system_state.

Required Methods§

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

Returns the number of memory mappings in the state that Self::as_system_state will return.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<A: Arch> AsSystemState<A> for Box<SystemState<A>>

§

type Output<'a> = &'a SystemState<A>

§

fn as_system_state(&self) -> Self::Output<'_>

§

impl<A: Arch, T> AsSystemState<A> for (SystemState<A>, T)

§

type Output<'a> = &'a SystemState<A> where Self: 'a

§

fn as_system_state(&self) -> Self::Output<'_>

Implementors§

§

impl<A: Arch> AsSystemState<A> for &MaybeJitState<'_, A>

§

type Output<'a> = MaybeRef<'a, A> where Self: 'a

§

impl<A: Arch> AsSystemState<A> for &SystemState<A>

§

type Output<'a> = &'a SystemState<A> where Self: 'a

§

impl<A: Arch> AsSystemState<A> for MaybeJitState<'_, A>

§

type Output<'a> = MaybeRef<'a, A> where Self: 'a

§

impl<A: Arch> AsSystemState<A> for ComplexJitState<'_, A>

§

type Output<'a> = ComplexStateRef<'a, A> where Self: 'a

§

impl<A: Arch> AsSystemState<A> for GpRegJitState<'_, A>

§

type Output<'a> = GpRegStateRef<'a, A> where Self: 'a

§

impl<A: Arch> AsSystemState<A> for SimpleJitState<'_, A>

§

type Output<'a> = SimpleStateRef<'a, A> where Self: 'a

§

impl<A: Arch> AsSystemState<A> for SystemState<A>

§

type Output<'a> = &'a SystemState<A>