[][src]Struct rvemu::csr::State

pub struct State { /* fields omitted */ }

The state to contains all the CSRs.

Methods

impl State[src]

pub fn new() -> Self[src]

Create a new state object.

pub fn get(&mut self, csr_address: CsrAddress) -> Result<&mut Csr, Exception>[src]

Get the CSR.

pub fn read(&self, csr_address: CsrAddress) -> Result<Mxlen, Exception>[src]

Read the value from the CSR.

pub fn write(
    &mut self,
    csr_address: CsrAddress,
    value: Mxlen
) -> Result<(), Exception>
[src]

Write the value to the CSR.

pub fn reset(&mut self)[src]

Reset all the CSRs.

Auto Trait Implementations

impl RefUnwindSafe for State

impl Send for State

impl Sync for State

impl Unpin for State

impl UnwindSafe for State

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.