pub struct ModelProviderModelId(/* private fields */);Expand description
An opaque model identifier reported by the selected provider binding.
The exact visible-ASCII value is retained without trimming or
normalization and redacted from Debug output.
Implementations§
Source§impl ModelProviderModelId
impl ModelProviderModelId
Sourcepub fn new(
value: impl Into<String>,
) -> Result<Self, ModelProviderIdentifierError>
pub fn new( value: impl Into<String>, ) -> Result<Self, ModelProviderIdentifierError>
Validates and constructs an identifier without copying an owned string.
§Errors
Returns ModelProviderIdentifierError when the value is empty,
oversized, or not entirely visible ASCII without spaces.
Trait Implementations§
Source§impl AsRef<str> for ModelProviderModelId
impl AsRef<str> for ModelProviderModelId
Source§impl Borrow<str> for ModelProviderModelId
impl Borrow<str> for ModelProviderModelId
Source§impl Clone for ModelProviderModelId
impl Clone for ModelProviderModelId
Source§impl Debug for ModelProviderModelId
impl Debug for ModelProviderModelId
Source§impl<'de> Deserialize<'de> for ModelProviderModelId
impl<'de> Deserialize<'de> for ModelProviderModelId
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
impl Eq for ModelProviderModelId
Source§impl FromStr for ModelProviderModelId
impl FromStr for ModelProviderModelId
Source§impl Hash for ModelProviderModelId
impl Hash for ModelProviderModelId
Source§impl JsonSchema for ModelProviderModelId
impl JsonSchema for ModelProviderModelId
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
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§impl Ord for ModelProviderModelId
impl Ord for ModelProviderModelId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ModelProviderModelId
impl PartialEq for ModelProviderModelId
Source§impl PartialOrd for ModelProviderModelId
impl PartialOrd for ModelProviderModelId
Source§impl Serialize for ModelProviderModelId
impl Serialize for ModelProviderModelId
impl StructuralPartialEq for ModelProviderModelId
Source§impl TryFrom<&str> for ModelProviderModelId
impl TryFrom<&str> for ModelProviderModelId
Auto Trait Implementations§
impl Forget for ModelProviderModelId
impl Freeze for ModelProviderModelId
impl Move for ModelProviderModelId
impl RefUnwindSafe for ModelProviderModelId
impl Send for ModelProviderModelId
impl Sync for ModelProviderModelId
impl Unpin for ModelProviderModelId
impl UnsafeUnpin for ModelProviderModelId
impl UnwindSafe for ModelProviderModelId
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