pub trait Clock:
Debug
+ Send
+ Sync {
// Required method
fn now(&self) -> DateTime<Utc>;
}Expand description
Core traits and types.
Always available regardless of feature flags. Includes:
Agent- The fundamental trait for all agentsTool/Toolset- For extending agents with capabilitiesSession/State- For managing conversation contextEvent- For streaming agent responsesAdkError/Result- Unified error handling Source of the current UTC time.
§Example
use adk_core::{Clock, SystemClock};
let before = chrono::Utc::now();
assert!(SystemClock.now() >= before);Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".