pub struct ScriptedDeviceIo<D: DeviceIo> { /* private fields */ }Implementations§
Source§impl<D: DeviceIo> ScriptedDeviceIo<D>
impl<D: DeviceIo> ScriptedDeviceIo<D>
Sourcepub fn new(
inner: D,
key: impl Fn(&D::Seq) -> u64 + Send + 'static,
vocab: usize,
max_depth: usize,
) -> Self
pub fn new( inner: D, key: impl Fn(&D::Seq) -> u64 + Send + 'static, vocab: usize, max_depth: usize, ) -> Self
2026-09-25: key matches a row to its script; vocab sizes the host-logits rows;
max_depth is what the router reports (never more than the inner
router’s own).
Sourcepub fn script(&self, key: u64, tokens: impl IntoIterator<Item = u32>)
pub fn script(&self, key: u64, tokens: impl IntoIterator<Item = u32>)
2026-09-25: The tokens the decode lane will read back for the row keyed key,
in order. A row with no line left answers what the inner router
answered.
Sourcepub fn fail_next(&self, fault: Fault)
pub fn fail_next(&self, fault: Fault)
2026-09-25: Raise fault on the next launch (queued, in order).
Sourcepub fn effects(&self) -> Vec<String>
pub fn effects(&self) -> Vec<String>
2026-09-25: Every effect and LoRA command applied so far, by label, in order.
pub fn launches(&self) -> usize
pub fn inner(&self) -> &D
Trait Implementations§
Source§impl<D: DeviceIo> DeviceIo for ScriptedDeviceIo<D>
impl<D: DeviceIo> DeviceIo for ScriptedDeviceIo<D>
Source§type Seq = <D as DeviceIo>::Seq
type Seq = <D as DeviceIo>::Seq
2026-09-25: The per-sequence device bookkeeping the plans and effects mutate.
Source§type Model = <D as DeviceIo>::Model
type Model = <D as DeviceIo>::Model
2026-09-25: The model behind this router, returned by
Self::model for
calls that go around plans and effects.Source§type LoraCmd = <D as DeviceIo>::LoraCmd
type LoraCmd = <D as DeviceIo>::LoraCmd
2026-09-25: A LoRA control command and its acknowledgement.
type LoraAck = <D as DeviceIo>::LoraAck
fn model(&self) -> &D::Model
Source§fn facts(&self) -> DeviceFacts
fn facts(&self) -> DeviceFacts
2026-09-25: The KV pool and SSM snapshot counters (
DeviceFacts).Source§fn max_depth(&self) -> usize
fn max_depth(&self) -> usize
2026-09-25: How many steps may be in flight (1 = every step settles before the
next launches).
Source§fn launch(
&self,
plan: StepPlan<'_>,
rows: &mut [&mut D::Seq],
) -> Result<Ticket, DeviceError>
fn launch( &self, plan: StepPlan<'_>, rows: &mut [&mut D::Seq], ) -> Result<Ticket, DeviceError>
fn await_result( &self, ticket: Ticket, ) -> Result<StepResult<D::Ptr>, DeviceError>
fn apply( &self, effect: Effect<'_, D::Seq, D::Ptr>, ) -> Result<EffectOutcome, DeviceError>
Auto Trait Implementations§
impl<D> !Freeze for ScriptedDeviceIo<D>
impl<D> !RefUnwindSafe for ScriptedDeviceIo<D>
impl<D> Send for ScriptedDeviceIo<D>
impl<D> !Sync for ScriptedDeviceIo<D>
impl<D> Unpin for ScriptedDeviceIo<D>
impl<D> !UnwindSafe for ScriptedDeviceIo<D>
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