pub enum ToolScheduling {
Parallel,
Serial,
}Expand description
How a tool’s invocations should be scheduled relative to other tools in the same batch of model-produced tool calls.
Tools that only read state (read_file, grep, glob, …) can run
in parallel safely and should use the default ToolScheduling::Parallel.
Tools that mutate shared state (apply_patch, exec_command,
write_stdin) should declare
ToolScheduling::Serial so the dispatcher runs them one-at-a-time
and avoids interleaving with each other.
This controls scheduling within a batch of tool calls; protocol ownership is selected by the host plugin stack.
Variants§
Parallel
Safe to run concurrently with other parallel tools in the same batch.
Serial
Must run one-at-a-time relative to other serial tools in the batch.
Trait Implementations§
Source§impl Clone for ToolScheduling
impl Clone for ToolScheduling
Source§fn clone(&self) -> ToolScheduling
fn clone(&self) -> ToolScheduling
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ToolScheduling
Source§impl Debug for ToolScheduling
impl Debug for ToolScheduling
Source§impl Default for ToolScheduling
impl Default for ToolScheduling
Source§fn default() -> ToolScheduling
fn default() -> ToolScheduling
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolScheduling
impl<'de> Deserialize<'de> for ToolScheduling
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolScheduling, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolScheduling, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ToolScheduling
Source§impl PartialEq for ToolScheduling
impl PartialEq for ToolScheduling
Source§fn eq(&self, other: &ToolScheduling) -> bool
fn eq(&self, other: &ToolScheduling) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolScheduling
impl Serialize for ToolScheduling
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ToolScheduling
Auto Trait Implementations§
impl Freeze for ToolScheduling
impl RefUnwindSafe for ToolScheduling
impl Send for ToolScheduling
impl Sync for ToolScheduling
impl Unpin for ToolScheduling
impl UnsafeUnpin for ToolScheduling
impl UnwindSafe for ToolScheduling
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