Skip to main content

CsrEncoding

Struct CsrEncoding 

Source
pub struct CsrEncoding<const ENCODING: u16, Access: Accessible>(/* private fields */);
Expand description

Tag for a riscv64 CSR, expressing its encoding and access permissions.

Trait Implementations§

Source§

impl<const ENCODING: u16> ControlAndStatusRegisterEncoding for CsrEncoding<ENCODING, Ro>

Source§

const VALUE: u16 = ENCODING

The register’s 12-bit encoding value.
Source§

const VALID: ()

Whether the encoding is valid.
Source§

type Access = (Read, NoWrite)

The register’s access permissions.
Source§

impl<const ENCODING: u16> ControlAndStatusRegisterEncoding for CsrEncoding<ENCODING, RwSafe>

Source§

const VALUE: u16 = ENCODING

The register’s 12-bit encoding value.
Source§

const VALID: ()

Whether the encoding is valid.
Source§

type Access = (Read, SafeWrite)

The register’s access permissions.
Source§

impl<const ENCODING: u16> ControlAndStatusRegisterEncoding for CsrEncoding<ENCODING, RwUnsafe>

Source§

const VALUE: u16 = ENCODING

The register’s 12-bit encoding value.
Source§

const VALID: ()

Whether the encoding is valid.
Source§

type Access = (Read, UnsafeWrite)

The register’s access permissions.
Source§

impl<const ENCODING: u16> ControlAndStatusRegisterEncoding for CsrEncoding<ENCODING, WoSafe>

Source§

const VALUE: u16 = ENCODING

The register’s 12-bit encoding value.
Source§

const VALID: ()

Whether the encoding is valid.
Source§

type Access = (NoRead, SafeWrite)

The register’s access permissions.
Source§

impl<const ENCODING: u16> ControlAndStatusRegisterEncoding for CsrEncoding<ENCODING, WoUnsafe>

Source§

const VALUE: u16 = ENCODING

The register’s 12-bit encoding value.
Source§

const VALID: ()

Whether the encoding is valid.
Source§

type Access = (NoRead, UnsafeWrite)

The register’s access permissions.

Auto Trait Implementations§

§

impl<const ENCODING: u16, Access> Freeze for CsrEncoding<ENCODING, Access>

§

impl<const ENCODING: u16, Access> RefUnwindSafe for CsrEncoding<ENCODING, Access>
where Access: RefUnwindSafe,

§

impl<const ENCODING: u16, Access> Send for CsrEncoding<ENCODING, Access>
where Access: Send,

§

impl<const ENCODING: u16, Access> Sync for CsrEncoding<ENCODING, Access>
where Access: Sync,

§

impl<const ENCODING: u16, Access> Unpin for CsrEncoding<ENCODING, Access>
where Access: Unpin,

§

impl<const ENCODING: u16, Access> UnsafeUnpin for CsrEncoding<ENCODING, Access>

§

impl<const ENCODING: u16, Access> UnwindSafe for CsrEncoding<ENCODING, Access>
where Access: UnwindSafe,

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.