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: u32Implementations§
Source§impl Harness<MockEngine>
impl Harness<MockEngine>
pub fn new() -> Harness<MockEngine>
pub fn with_config(cfg: EngineConfig) -> Harness<MockEngine>
Source§impl<E: Engine, R: StageRings> Harness<E, R>
impl<E: Engine, R: StageRings> Harness<E, R>
pub fn with_engine_and_rings(engine: E, rings: R) -> Harness<E, R>
pub fn with_max_decode_lanes(self, n: u32) -> Self
pub fn plan(&self) -> PlanBuilder
pub fn tick_ok(&mut self, pb: PlanBuilder) -> Events
pub fn tick_err(&mut self, pb: PlanBuilder) -> Status
pub fn prompt(&mut self, tokens: &[u32]) -> TokenRef
pub fn rings_tokens(&self, r: &TokenRef) -> Vec<u32>
Trait Implementations§
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>
impl<E, R> Unpin for Harness<E, R>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more