DecisionTrait

Trait DecisionTrait 

Source
pub trait DecisionTrait: Sized + InstructPromptTrait {
    type ReasonPrimitive: PrimitiveTrait + ReasonTrait;

    // Required methods
    fn base_req(&self) -> &CompletionRequest;
    fn base_req_mut(&mut self) -> &mut CompletionRequest;
    fn primitive(&self) -> &Self::ReasonPrimitive;
    async fn return_reason_result(
        &mut self,
        result_can_be_none: bool,
    ) -> Result<ReasonResult, Error>;

    // Provided method
    fn decision(self) -> Decision<Self> { ... }
}

Required Associated Types§

Required Methods§

Source

fn base_req(&self) -> &CompletionRequest

Source

fn base_req_mut(&mut self) -> &mut CompletionRequest

Source

fn primitive(&self) -> &Self::ReasonPrimitive

Source

async fn return_reason_result( &mut self, result_can_be_none: bool, ) -> Result<ReasonResult, Error>

Provided Methods§

Source

fn decision(self) -> Decision<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§