Trait rust_cheri_compressed_cap::wrappers::CheriRVFuncs[][src]

pub trait CheriRVFuncs<T: CompressedCapability> {
    type Cap;
    type CapAddrInt;
    type CapAddrBits;
    type CapLen;
    type OType;
    type Perms;
    type Flags;
Show methods fn getCapBounds(c: &Self::Cap) -> (Self::CapAddrInt, Self::CapLen);
fn getCapBaseBits(c: &Self::Cap) -> Self::CapAddrBits;
fn getCapTop(c: &Self::Cap) -> Self::CapLen;
fn getCapLength(c: &Self::Cap) -> Self::CapLen;
fn inCapBounds(
        c: &Self::Cap,
        addr: Self::CapAddrBits,
        size: Self::CapLen
    ) -> bool;
fn getCapCursor(c: &Self::Cap) -> Self::CapAddrInt;
fn getCapOffsetBits(c: &Self::Cap) -> Self::CapAddrBits;
fn setCapBounds(
        c: &Self::Cap,
        base: Self::CapAddrBits,
        top: Self::CapLen
    ) -> (bool, Self::Cap);
fn setCapAddr(c: &Self::Cap, addr: Self::CapAddrBits) -> (bool, Self::Cap);
fn setCapOffset(
        c: &Self::Cap,
        offset: Self::CapAddrBits
    ) -> (bool, Self::Cap);
fn incCapOffset(
        c: &Self::Cap,
        offset_inc: Self::CapAddrBits
    ) -> (bool, Self::Cap);
fn getRepresentableAlignmentMask(val: Self::CapLen) -> Self::CapLen;
fn getRepresentableLength(val: Self::CapLen) -> Self::CapLen;
fn sealCap(c: &Self::Cap, otype: Self::OType) -> Self::Cap;
fn unsealCap(c: &Self::Cap) -> Self::Cap;
fn isCapSealed(c: &Self::Cap) -> bool;
fn hasReservedOType(c: &Self::Cap) -> bool;
fn invalidateCap(c: &Self::Cap) -> Self::Cap;
fn getCapPerms(c: &Self::Cap) -> Self::Perms;
fn setCapPerms(c: &Self::Cap, perms: Self::Perms) -> Self::Cap;
fn getCapFlags(c: &Self::Cap) -> Self::Flags;
fn setCapFlags(c: &Self::Cap, flags: Self::Flags) -> Self::Cap;
}

Trait exposing the utility functions used to specify CHERI-RISC-V behaviour in Tech Report 951. Behaviour is derived from the Sail specification

Associated Types

type Cap[src]

type CapAddrInt[src]

type CapAddrBits[src]

type CapLen[src]

type OType[src]

type Perms[src]

type Flags[src]

Loading content...

Required methods

fn getCapBounds(c: &Self::Cap) -> (Self::CapAddrInt, Self::CapLen)[src]

fn getCapBaseBits(c: &Self::Cap) -> Self::CapAddrBits[src]

fn getCapTop(c: &Self::Cap) -> Self::CapLen[src]

fn getCapLength(c: &Self::Cap) -> Self::CapLen[src]

fn inCapBounds(
    c: &Self::Cap,
    addr: Self::CapAddrBits,
    size: Self::CapLen
) -> bool
[src]

fn getCapCursor(c: &Self::Cap) -> Self::CapAddrInt[src]

fn getCapOffsetBits(c: &Self::Cap) -> Self::CapAddrBits[src]

fn setCapBounds(
    c: &Self::Cap,
    base: Self::CapAddrBits,
    top: Self::CapLen
) -> (bool, Self::Cap)
[src]

fn setCapAddr(c: &Self::Cap, addr: Self::CapAddrBits) -> (bool, Self::Cap)[src]

fn setCapOffset(c: &Self::Cap, offset: Self::CapAddrBits) -> (bool, Self::Cap)[src]

fn incCapOffset(
    c: &Self::Cap,
    offset_inc: Self::CapAddrBits
) -> (bool, Self::Cap)
[src]

fn getRepresentableAlignmentMask(val: Self::CapLen) -> Self::CapLen[src]

fn getRepresentableLength(val: Self::CapLen) -> Self::CapLen[src]

fn sealCap(c: &Self::Cap, otype: Self::OType) -> Self::Cap[src]

fn unsealCap(c: &Self::Cap) -> Self::Cap[src]

fn isCapSealed(c: &Self::Cap) -> bool[src]

fn hasReservedOType(c: &Self::Cap) -> bool[src]

fn invalidateCap(c: &Self::Cap) -> Self::Cap[src]

fn getCapPerms(c: &Self::Cap) -> Self::Perms[src]

fn setCapPerms(c: &Self::Cap, perms: Self::Perms) -> Self::Cap[src]

fn getCapFlags(c: &Self::Cap) -> Self::Flags[src]

fn setCapFlags(c: &Self::Cap, flags: Self::Flags) -> Self::Cap[src]

Loading content...

Implementors

impl<T: CompressedCapability> CheriRVFuncs<T> for T where
    T::Offset: TryInto<T::Addr>, 
[src]

type Cap = CcxCap<T>

type CapAddrInt = T::Addr

type CapAddrBits = T::Addr

type CapLen = T::Length

type OType = u32

type Perms = u32

type Flags = u8

Loading content...