Skip to main content

Harness

Struct Harness 

Source
pub struct Harness<E: Engine = MockEngine, R: StageRings = InMemoryRings> {
    pub engine: E,
    pub rings: R,
    pub next_seq: Cell<u64>,
    pub max_decode_lanes: u32,
}

Fields§

§engine: E§rings: R§next_seq: Cell<u64>§max_decode_lanes: u32

Implementations§

Source§

impl Harness<MockEngine>

Source§

impl<E: Engine> Harness<E>

Source

pub fn with_engine(engine: E) -> Harness<E>

Source§

impl<E: Engine, R: StageRings> Harness<E, R>

Source

pub fn with_engine_and_rings(engine: E, rings: R) -> Harness<E, R>

Source

pub fn with_max_decode_lanes(self, n: u32) -> Self

Source

pub fn plan(&self) -> PlanBuilder

Source

pub fn tick_ok(&mut self, pb: PlanBuilder) -> Events

Source

pub fn tick_err(&mut self, pb: PlanBuilder) -> Status

Source

pub fn prompt(&mut self, tokens: &[u32]) -> TokenRef

Source

pub fn rings_tokens(&self, r: &TokenRef) -> Vec<u32>

Trait Implementations§

Source§

impl Default for Harness<MockEngine>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<E = MockEngine, R = InMemoryRings> !Freeze for Harness<E, R>

§

impl<E = MockEngine, R = InMemoryRings> !RefUnwindSafe for Harness<E, R>

§

impl<E = MockEngine, R = InMemoryRings> !Sync for Harness<E, R>

§

impl<E, R> Send for Harness<E, R>
where E: Send, R: Send,

§

impl<E, R> Unpin for Harness<E, R>
where E: Unpin, R: Unpin,

§

impl<E, R> UnsafeUnpin for Harness<E, R>
where E: UnsafeUnpin, R: UnsafeUnpin,

§

impl<E, R> UnwindSafe for Harness<E, R>
where E: UnwindSafe, R: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = !

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.