pub struct ImageUrl {
pub url: String,
pub detail: Option<ImageDetail>,
}Expand description
The image URL of a message content part.
Fields§
§url: StringThe URL of the image.
detail: Option<ImageDetail>The detail of the image.
Implementations§
Source§impl ImageUrl
impl ImageUrl
Sourcepub fn url(url: String, detail: Option<ImageDetail>) -> Self
pub fn url(url: String, detail: Option<ImageDetail>) -> Self
Specify full URL.
Sourcepub fn upload_base64(
base64: String,
format: ImageFormat,
detail: Option<ImageDetail>,
) -> Self
pub fn upload_base64( base64: String, format: ImageFormat, detail: Option<ImageDetail>, ) -> Self
Upload a Base64 encoded image.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ImageUrl
impl<'de> Deserialize<'de> for ImageUrl
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 ImageUrl
impl StructuralPartialEq for ImageUrl
Auto Trait Implementations§
impl Freeze for ImageUrl
impl RefUnwindSafe for ImageUrl
impl Send for ImageUrl
impl Sync for ImageUrl
impl Unpin for ImageUrl
impl UnwindSafe for ImageUrl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.