#[non_exhaustive]pub struct InferenceString {
pub type: Option<EmbeddingContentType>,
pub format: Option<EmbeddingContentFormat>,
pub value: Option<String>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type: Option<EmbeddingContentType>The type of data that the value represents.
format: Option<EmbeddingContentFormat>The format of the data. If null, the default data format for the given type is used.
value: Option<String>String which may be raw text, or the string representation of some other data such as an image in base64.
Implementations§
Source§impl InferenceString
impl InferenceString
Sourcepub fn new(
type: impl Into<EmbeddingContentType>,
value: impl Into<String>,
) -> InferenceString
pub fn new( type: impl Into<EmbeddingContentType>, value: impl Into<String>, ) -> InferenceString
A InferenceString with its required properties set.
Source§impl InferenceString
impl InferenceString
Sourcepub fn format(self, value: impl Into<EmbeddingContentFormat>) -> InferenceString
pub fn format(self, value: impl Into<EmbeddingContentFormat>) -> InferenceString
Sets format.
Trait Implementations§
Source§impl Clone for InferenceString
impl Clone for InferenceString
Source§fn clone(&self) -> InferenceString
fn clone(&self) -> InferenceString
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InferenceString
impl Debug for InferenceString
Source§impl<'de> Deserialize<'de> for InferenceString
impl<'de> Deserialize<'de> for InferenceString
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InferenceString, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InferenceString, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InferenceString
impl PartialEq for InferenceString
Source§impl Serialize for InferenceString
impl Serialize for InferenceString
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 InferenceString
Auto Trait Implementations§
impl Freeze for InferenceString
impl RefUnwindSafe for InferenceString
impl Send for InferenceString
impl Sync for InferenceString
impl Unpin for InferenceString
impl UnsafeUnpin for InferenceString
impl UnwindSafe for InferenceString
Blanket Implementations§
impl<T> Allocation for T
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