pub struct ModelInfo {
pub id: String,
pub display_name: String,
pub created_at: String,
}Available on crate features
anthropic and models only.Expand description
Information about an Anthropic model.
Contains the model identifier, human-readable display name, and creation timestamp as returned by the Anthropic Models API.
§Example
ⓘ
use adk_model::anthropic::{AnthropicClient, AnthropicConfig};
let client = AnthropicClient::new(AnthropicConfig::new("sk-ant-xxx", "claude-sonnet-4-5-20250929"))?;
let models = client.list_models().await?;
for model in &models {
println!("{}: {} (created {})", model.id, model.display_name, model.created_at);
}Fields§
§id: StringUnique model identifier (e.g., “claude-sonnet-4-5-20250929”).
display_name: StringHuman-readable name for the model.
created_at: StringRFC 3339 datetime string of when the model was created.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelInfo
impl<'de> Deserialize<'de> for ModelInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ModelInfo
Source§impl Serialize for ModelInfo
impl Serialize for ModelInfo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ModelInfo
Auto Trait Implementations§
impl Freeze for ModelInfo
impl RefUnwindSafe for ModelInfo
impl Send for ModelInfo
impl Sync for ModelInfo
impl Unpin for ModelInfo
impl UnsafeUnpin for ModelInfo
impl UnwindSafe for ModelInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.