Skip to navigation

Struct Function Definition

View as Markdown

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 struct FunctionDefinition {
    pub name: String,
    pub description: Option<String>,
    pub parameters: Option<JsonValue>,
    pub strict: Option<bool>,
    pub extra: HashMap<String, JsonValue>,
}

Function name, optional description and JSON Schema, strictness, and extensions.

Fields

name: String

The name of the function.

description: Option<String>

A description of what the function does.

parameters: Option<JsonValue>

The JSON Schema for the function parameters.

strict: Option<bool>

Whether the provider should enforce the parameter schema strictly.

extra: HashMap<String, JsonValue>

Provider fields without portable semantics.

Implementations

impl FunctionDefinition

impl FunctionDefinition

description

pub fn description(&self) -> &str

Returns the value of description, or the default value if description is unset.

strict

pub fn strict(&self) -> bool

Returns the value of strict, or the default value if strict is unset.

Trait Implementations

impl Clone for FunctionDefinition

impl Clone for FunctionDefinition

clone

fn clone(&self) -> FunctionDefinition

clone_from

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

impl Debug for FunctionDefinition

impl Debug for FunctionDefinition

fmt

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

impl Default for FunctionDefinition

impl Default for FunctionDefinition

default

fn default() -> Self

impl Message for FunctionDefinition

impl Message for FunctionDefinition

encoded_len

fn encoded_len(&self) -> usize

clear

fn clear(&mut self)

encode

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
    Self: Sized,

encode_to_vec

fn encode_to_vec(&self) -> Vec<u8> where
    Self: Sized,

encode_length_delimited

fn encode_length_delimited(
    &self,
    buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
    Self: Sized,

encode_length_delimited_to_vec

fn encode_length_delimited_to_vec(&self) -> Vec<u8> where
    Self: Sized,

decode

fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
    Self: Default,

decode_length_delimited

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
    Self: Default,

merge

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
    Self: Sized,

merge_length_delimited

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
    Self: Sized,

impl Name for FunctionDefinition

impl Name for FunctionDefinition

NAME

const NAME: &'static str = "FunctionDefinition"

PACKAGE

const PACKAGE: &'static str = "nvidia.nemo.relay.worker.v1"

full_name

fn full_name() -> String

type_url

fn type_url() -> String

impl PartialEq for FunctionDefinition

impl PartialEq for FunctionDefinition

eq

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

ne

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

impl WireValue<FunctionDefinition> for FunctionDefinition

impl WireValue<FunctionDefinition> for FunctionDefinition

to_wire

fn to_wire(self) -> Result<FunctionDefinition>

from_wire

fn from_wire(value: FunctionDefinition) -> Result<Self>

impl StructuralPartialEq for FunctionDefinition

impl StructuralPartialEq for FunctionDefinition