Skip to main content

ChatViaResponsesFanout

Struct ChatViaResponsesFanout 

Source
pub struct ChatViaResponsesFanout(/* private fields */);

Implementations§

Source§

impl ChatViaResponsesFanout

Source

pub async fn prepare<S: StateStore>( input: GenerateContentRequestBody, target: FanoutTarget, state: &GenerationStateAccess<'_, S>, ) -> Result<Self, TransformError>

Source

pub async fn prepare_with_capabilities<S: StateStore, R: ResourceAccess>( input: GenerateContentRequestBody, target: FanoutTarget, state: &GenerationStateAccess<'_, S>, resources: &GenerationResources<'_, R>, ) -> Result<Self, TransformError>

Resources are read once before cloning the single-candidate request.

Source

pub fn response_id(&self) -> &str

Source

pub fn children(&self) -> &[ChatViaResponses]

Source

pub async fn invoke<U: Upstream, S: StateStore>( &mut self, upstream: &U, target: &U::Target, limits: CodecLimits, state: &GenerationStateAccess<'_, S>, progress: &mut FanoutProgress<GenerateContentResponseBody>, facts: impl FnMut(usize, &GenerateContentResponseBody) -> Result<(), TransformError>, ) -> Result<Converted<GenerateContentResponseBody>, TransformError>

Sends each child at most once and aggregates their results in order.

Source§

impl ChatViaResponsesFanout

Trait Implementations§

Source§

impl Debug for ChatViaResponsesFanout

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ResourceSend for T
where T: Send + ?Sized,

Source§

impl<T> ResourceSync for T
where T: Sync + ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.