pub struct BinaryInputContent {
pub mime_type: String,
pub id: Option<String>,
pub url: Option<String>,
pub data: Option<String>,
pub filename: Option<String>,
}Expand description
The legacy binary content part.
Superseded by the modality-specific parts, but still accepted: at least one
of id, url or data must be set. That constraint is a runtime rule in
the upstream schema and is not encoded in this type — see
BinaryInputContent::has_payload.
Fields§
§mime_type: StringMIME type of the payload.
id: Option<String>Reference to a previously uploaded blob.
url: Option<String>URL to fetch the payload from.
data: Option<String>Inline payload, typically base64.
filename: Option<String>Original file name, for display.
Implementations§
Source§impl BinaryInputContent
impl BinaryInputContent
Sourcepub fn has_payload(&self) -> bool
pub fn has_payload(&self) -> bool
Whether the part carries a payload in any of the three accepted forms.
Trait Implementations§
Source§impl Clone for BinaryInputContent
impl Clone for BinaryInputContent
Source§fn clone(&self) -> BinaryInputContent
fn clone(&self) -> BinaryInputContent
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 ComposeSchema for BinaryInputContent
impl ComposeSchema for BinaryInputContent
Source§impl Debug for BinaryInputContent
impl Debug for BinaryInputContent
Source§impl Default for BinaryInputContent
impl Default for BinaryInputContent
Source§fn default() -> BinaryInputContent
fn default() -> BinaryInputContent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BinaryInputContent
impl<'de> Deserialize<'de> for BinaryInputContent
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 BinaryInputContent
Source§impl JsonSchema for BinaryInputContent
impl JsonSchema for BinaryInputContent
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(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &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 PartialEq for BinaryInputContent
impl PartialEq for BinaryInputContent
Source§fn eq(&self, other: &BinaryInputContent) -> bool
fn eq(&self, other: &BinaryInputContent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BinaryInputContent
impl Serialize for BinaryInputContent
impl StructuralPartialEq for BinaryInputContent
Auto Trait Implementations§
impl Freeze for BinaryInputContent
impl RefUnwindSafe for BinaryInputContent
impl Send for BinaryInputContent
impl Sync for BinaryInputContent
impl Unpin for BinaryInputContent
impl UnsafeUnpin for BinaryInputContent
impl UnwindSafe for BinaryInputContent
Blanket Implementations§
impl<T> AgentState 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
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.