pub struct Protocol {
pub id: String,
pub name: String,
pub version: String,
pub description: String,
pub strategy: ReasoningStrategy,
pub input: InputSpec,
pub steps: Vec<ProtocolStep>,
pub output: OutputSpec,
pub validation: Vec<ValidationRule>,
pub metadata: ProtocolMetadata,
}Expand description
A ThinkTool Protocol definition
Fields§
§id: StringUnique protocol identifier (e.g., “gigathink”, “laserlogic”)
name: StringHuman-readable name
version: StringProtocol version (semver)
description: StringBrief description
strategy: ReasoningStrategyReasoning strategy category
input: InputSpecInput specification
steps: Vec<ProtocolStep>Protocol steps (ordered)
output: OutputSpecOutput specification
validation: Vec<ValidationRule>Validation rules
metadata: ProtocolMetadataMetadata for composition
Implementations§
Source§impl Protocol
impl Protocol
Sourcepub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
Create a new protocol with required fields
Sourcepub fn with_step(self, step: ProtocolStep) -> Self
pub fn with_step(self, step: ProtocolStep) -> Self
Add a step to the protocol
Sourcepub fn with_strategy(self, strategy: ReasoningStrategy) -> Self
pub fn with_strategy(self, strategy: ReasoningStrategy) -> Self
Set the reasoning strategy
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Protocol
impl<'de> Deserialize<'de> for Protocol
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more