pub struct FunctionDynamicInstruction<F> { /* private fields */ }Expand description
Function-backed dynamic instruction.
Implementations§
Source§impl<F> FunctionDynamicInstruction<F>
impl<F> FunctionDynamicInstruction<F>
Trait Implementations§
Source§impl<F, Fut> DynamicInstruction for FunctionDynamicInstruction<F>where
F: Send + Sync + Fn(AgentRunState) -> Fut,
Fut: Send + Future<Output = DynamicInstructionResult<String>>,
impl<F, Fut> DynamicInstruction for FunctionDynamicInstruction<F>where
F: Send + Sync + Fn(AgentRunState) -> Fut,
Fut: Send + Future<Output = DynamicInstructionResult<String>>,
Source§fn instruction<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 AgentRunState,
) -> Pin<Box<dyn Future<Output = DynamicInstructionResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn instruction<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 AgentRunState,
) -> Pin<Box<dyn Future<Output = DynamicInstructionResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate instruction text for the current run state. Read more
Auto Trait Implementations§
impl<F> Freeze for FunctionDynamicInstruction<F>where
F: Freeze,
impl<F> RefUnwindSafe for FunctionDynamicInstruction<F>where
F: RefUnwindSafe,
impl<F> Send for FunctionDynamicInstruction<F>where
F: Send,
impl<F> Sync for FunctionDynamicInstruction<F>where
F: Sync,
impl<F> Unpin for FunctionDynamicInstruction<F>where
F: Unpin,
impl<F> UnsafeUnpin for FunctionDynamicInstruction<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FunctionDynamicInstruction<F>where
F: 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