Enum rsim::processor::elements::cheri::SafeTaggedCap[][src]

pub enum SafeTaggedCap {
    RawData {
        top: u64,
        bot: u64,
    },
    ValidCap(Cc128Cap),
}

Enumeration that stores either raw data or a valid capability. The capability inside ValidCap(Cc128Cap) will always have its tag bit = True as long as SafeTaggedCap::ValidCap is not created manually.

Variants

RawData
Show fields

Fields of RawData

top: u64bot: u64
ValidCap(Cc128Cap)

Implementations

impl SafeTaggedCap[src]

pub fn from_integer(data: u128) -> Self[src]

pub fn to_integer(&self) -> u128[src]

pub fn from_tagged_mem(top: u64, bot: u64, tag: bool) -> Self[src]

pub fn from_cap(cap: Cc128Cap) -> Self[src]

Converts a capability into a SafeTaggedCap. If the capability is valid (has tag bit set), returns ValidCap If the capability is invalid, returns RawData containing the compressed-raw representation

pub fn to_cap(&self) -> Cc128Cap[src]

Converts a SafeTaggedCap to a Cc128Cap. If ValidCap, just returns the cap. If RawData, decompresses using raw representation and tag=false.

pub fn unwrap_cap(&self) -> Cc128Cap[src]

Converts a SafeTaggedCap to a Cc128Cap with tag bit = true. Panics if the SafeTaggedCap is not a ValidCap.

Trait Implementations

impl Clone for SafeTaggedCap[src]

impl Debug for SafeTaggedCap[src]

impl Default for SafeTaggedCap[src]

impl MemoryOf<SafeTaggedCap, CcxCap<Cc128>> for CheriAggregateMemory[src]

Impl a capability-aware view of memory for CHERI instructions e.g. a CHERI Load instruction, which is allowed to load capabilities, would use this version.

impl PartialEq<SafeTaggedCap> for SafeTaggedCap[src]

impl RegisterFile<SafeTaggedCap> for CheriRV64RegisterFile[src]

impl<'a> VecMemInterface<u64, SafeTaggedCap> for CheriAggregateMemory[src]

impl<'a> VecMemInterface<u64, SafeTaggedCap> for IntegerModeCheriAggregateMemory<'a>[src]

impl VectorRegisterFile<SafeTaggedCap> for CheriVectorRegisterFile[src]

impl Copy for SafeTaggedCap[src]

impl Eq for SafeTaggedCap[src]

impl StructuralEq for SafeTaggedCap[src]

impl StructuralPartialEq for SafeTaggedCap[src]

Auto Trait Implementations

impl RefUnwindSafe for SafeTaggedCap

impl Send for SafeTaggedCap

impl Sync for SafeTaggedCap

impl Unpin for SafeTaggedCap

impl UnwindSafe for SafeTaggedCap

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.