pub struct DatetimeTool;Expand description
日期时间工具
获取当前时间信息,包括公历、农历(干支纪年)、生肖、星座等
Implementations§
Source§impl DatetimeTool
impl DatetimeTool
Sourcepub fn get_time_info(&self) -> String
pub fn get_time_info(&self) -> String
获取时间信息
Sourcepub fn get_detailed_info(&self) -> Value
pub fn get_detailed_info(&self) -> Value
获取详细的时间信息(JSON 格式)
Trait Implementations§
Source§impl Default for DatetimeTool
impl Default for DatetimeTool
Source§impl Tool for DatetimeTool
impl Tool for DatetimeTool
Source§fn categories(&self) -> &'static [ToolCategory]
fn categories(&self) -> &'static [ToolCategory]
工具分类 Read more
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
工具输入参数的 schema Read more
Source§fn call<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
执行工具 Read more
Source§fn definition(&self) -> ToolDefinition
fn definition(&self) -> ToolDefinition
获取工具定义 (ToolDefinition) Read more
Auto Trait Implementations§
impl Freeze for DatetimeTool
impl RefUnwindSafe for DatetimeTool
impl Send for DatetimeTool
impl Sync for DatetimeTool
impl Unpin for DatetimeTool
impl UnsafeUnpin for DatetimeTool
impl UnwindSafe for DatetimeTool
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