Skip to navigation

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub enum Choice {
    Auto(()),
    None(()),
    Required(()),
    Specific(ToolChoiceFunction),
    ProviderNative(ProviderNativeComponent),
}

Exactly one recognized alternative is required when this message is present.

Variants

Auto(())

Auto(())

Allows the provider to select tools automatically.

None(())

None(())

Explicitly selects no tool or no codec, according to the enclosing alternative.

Required(())

Required(())

Requires tool selection without naming a particular tool.

Specific(ToolChoiceFunction)

Specific(ToolChoiceFunction)

Selects a particular function using its provider discriminator and name.

ProviderNative(ProviderNativeComponent)

ProviderNative(ProviderNativeComponent)

Provider-owned component preserved with its provider, native discriminator, and JSON value.

Implementations

impl Choice

impl Choice

encode

pub fn encode(&self, buf: &mut impl BufMut)

Encodes the message to a buffer.

merge

pub fn merge(
    field: &mut Option<Choice>,
    tag: u32,
    wire_type: WireType,
    buf: &mut impl Buf,
    ctx: DecodeContext,
) -> Result<(), DecodeError>

Decodes an instance of the message from a buffer, and merges it into self.

encoded_len

pub fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.

Trait Implementations

impl Clone for Choice

impl Clone for Choice

clone

fn clone(&self) -> Choice

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for Choice

impl Debug for Choice

fmt

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

impl Hash for Choice

impl Hash for Choice

hash

fn hash<__H: Hasher>(&self, state: &mut __H)

hash_slice

fn hash_slice<H>(data: &[Self], state: &mut H)where
    H: Hasher,
    Self: Sized,

impl PartialEq for Choice

impl PartialEq for Choice

eq

fn eq(&self, other: &Choice) -> bool

ne

fn ne(&self, other: &Rhs) -> bool

impl Eq for Choice

impl Eq for Choice

impl StructuralPartialEq for Choice

impl StructuralPartialEq for Choice