pub struct ModelKey(/* private fields */);Expand description
Direct runnable provider/model-id identity.
Implementations§
Source§impl ModelKey
impl ModelKey
pub fn new( provider: ProviderId, model: ProviderModelId, ) -> Result<ModelKey, IdentityError>
pub fn as_str(&self) -> &str
pub fn provider_id(&self) -> ProviderId
pub fn model_id(&self) -> ProviderModelId
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelKey
impl<'de> Deserialize<'de> for ModelKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ModelKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ModelKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ModelKey
Source§impl JsonSchema for ModelKey
impl JsonSchema for ModelKey
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§fn json_schema(_generator: &mut SchemaGenerator) -> Schema
fn json_schema(_generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§impl Ord for ModelKey
impl Ord for ModelKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for ModelKey
impl PartialOrd for ModelKey
Source§impl Serialize for ModelKey
impl Serialize for ModelKey
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 ModelKey
Auto Trait Implementations§
impl Freeze for ModelKey
impl RefUnwindSafe for ModelKey
impl Send for ModelKey
impl Sync for ModelKey
impl Unpin for ModelKey
impl UnsafeUnpin for ModelKey
impl UnwindSafe for ModelKey
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