pub struct FunctionDeclaration {
pub name: String,
pub description: String,
pub parameters: Value,
pub scheduling: Option<FunctionScheduling>,
pub behavior: Option<FunctionBehavior>,
}Expand description
A custom function the model may call during the session.
Keep this aligned with the official Live API tool docs. Gemini 3.1 and 2.5 differ in important ways, especially around asynchronous tool execution.
Fields§
§name: String§description: String§parameters: ValueJSON Schema object describing the function’s parameters.
scheduling: Option<FunctionScheduling>Crate-level scheduling field retained for Gemini 2.5 compatibility work.
Official current Live API docs place response scheduling inside the
tool-response payload, not here. Treat this field as under audit until
roadmap item F-9 is completed.
behavior: Option<FunctionBehavior>Gemini 2.5: whether the function blocks model generation.
Trait Implementations§
Source§impl Clone for FunctionDeclaration
impl Clone for FunctionDeclaration
Source§fn clone(&self) -> FunctionDeclaration
fn clone(&self) -> FunctionDeclaration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FunctionDeclaration
impl Debug for FunctionDeclaration
Source§impl<'de> Deserialize<'de> for FunctionDeclaration
impl<'de> Deserialize<'de> for FunctionDeclaration
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
Source§impl PartialEq for FunctionDeclaration
impl PartialEq for FunctionDeclaration
Source§impl Serialize for FunctionDeclaration
impl Serialize for FunctionDeclaration
impl StructuralPartialEq for FunctionDeclaration
Auto Trait Implementations§
impl Freeze for FunctionDeclaration
impl RefUnwindSafe for FunctionDeclaration
impl Send for FunctionDeclaration
impl Sync for FunctionDeclaration
impl Unpin for FunctionDeclaration
impl UnsafeUnpin for FunctionDeclaration
impl UnwindSafe for FunctionDeclaration
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