pub struct WorkerClient {
pub hello: HelloAckW,
pub op_done: VecDeque<StateOpDoneMsg>,
/* private fields */
}Fields§
§hello: HelloAckW§op_done: VecDeque<StateOpDoneMsg>Implementations§
Source§impl WorkerClient
impl WorkerClient
pub fn connect( frames: UnixStream, fd_channel: UnixStream, ) -> Result<WorkerClient, AgentError>
Sourcepub fn yield_signal(&self) -> Option<YieldSignal>
pub fn yield_signal(&self) -> Option<YieldSignal>
The daemon’s control words for this worker (end the running tick at the next step boundary; prefill in short steps), settable from any thread.
pub fn raw_frames_stream(&mut self) -> &mut UnixStream ⓘ
pub fn stage_prompt( &mut self, tokens: &[u32], ) -> Result<TokenRefMsg, AgentError>
pub fn read_tokens(&self, r: &TokenRefMsg) -> Result<Vec<u32>, AgentError>
pub fn read_logits(&self, r: &RingRefMsg) -> Result<Vec<f32>, AgentError>
pub fn tick(&mut self, plan: TickPlanMsg) -> Result<TickEventsMsg, AgentError>
pub fn tick_streaming( &mut self, plan: TickPlanMsg, on_emit: &mut dyn FnMut(TickEmitMsg), ) -> Result<TickEventsMsg, AgentError>
pub fn match_prefix( &mut self, space_id: u32, span: TokenRefMsg, ) -> Result<MatchResMsg, AgentError>
pub fn seed_release(&mut self, seed_handle: u64) -> Result<(), AgentError>
pub fn seed_acquire( &mut self, span: TokenRefMsg, prefix_len: u64, determinism_class: u8, ) -> Result<u64, AgentError>
pub fn seed_acquire_leased( &mut self, span: TokenRefMsg, prefix_len: u64, determinism_class: u8, ) -> Result<(u64, Option<u64>), AgentError>
pub fn buf_create(&mut self, len: u64) -> Result<u64, AgentError>
pub fn buf_read(&self, buf_id: u64, len: usize) -> Result<Vec<u8>, AgentError>
pub fn buf_write(&self, buf_id: u64, data: &[u8]) -> Result<(), AgentError>
pub fn buf_release(&mut self, buf_id: u64) -> Result<(), AgentError>
pub fn state_op(&mut self, op: StateOpKind) -> Result<u64, AgentError>
pub fn wait_op_done(&mut self, op: u64) -> Result<StateOpDoneMsg, AgentError>
pub fn state_sync( &mut self, req: StateSyncReqMsg, ) -> Result<StateSyncOkMsg, AgentError>
pub fn send_transcribe_cancel(&mut self) -> Result<(), AgentError>
pub fn state_sync_streaming( &mut self, req: StateSyncReqMsg, on_segment: &mut dyn FnMut(TranscribeSegmentMsg) -> bool, ) -> Result<StateSyncOkMsg, AgentError>
pub fn register_strategy( &mut self, reg: StrategyRegisterMsg, ) -> Result<StrategyGrantOkMsg, AgentError>
pub fn ping(&mut self) -> Result<PongMsg, AgentError>
pub fn drain(&mut self) -> Result<(), AgentError>
Auto Trait Implementations§
impl !Sync for WorkerClient
impl Freeze for WorkerClient
impl RefUnwindSafe for WorkerClient
impl Send for WorkerClient
impl Unpin for WorkerClient
impl UnsafeUnpin for WorkerClient
impl UnwindSafe for WorkerClient
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