pub struct UserMessageInput { /* private fields */ }Expand description
One validated user message with zero or more normalized PNG attachments.
Implementations§
Source§impl UserMessageInput
impl UserMessageInput
Sourcepub fn text_only(text: &str) -> Result<Self, RuntimeError>
pub fn text_only(text: &str) -> Result<Self, RuntimeError>
Creates a text-only user message.
Sourcepub fn new(
text: &str,
images: Vec<UserImageInput>,
) -> Result<Self, RuntimeError>
pub fn new( text: &str, images: Vec<UserImageInput>, ) -> Result<Self, RuntimeError>
Creates a user message with ordered image attachments.
Sourcepub fn images(&self) -> &[UserImageInput]
pub fn images(&self) -> &[UserImageInput]
Ordered normalized PNG attachments.
Trait Implementations§
Source§impl Clone for UserMessageInput
impl Clone for UserMessageInput
Source§impl Debug for UserMessageInput
impl Debug for UserMessageInput
impl Eq for UserMessageInput
Source§impl PartialEq for UserMessageInput
impl PartialEq for UserMessageInput
impl StructuralPartialEq for UserMessageInput
Auto Trait Implementations§
impl Forget for UserMessageInput
impl Freeze for UserMessageInput
impl Move for UserMessageInput
impl RefUnwindSafe for UserMessageInput
impl Send for UserMessageInput
impl Sync for UserMessageInput
impl Unpin for UserMessageInput
impl UnsafeUnpin for UserMessageInput
impl UnwindSafe for UserMessageInput
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.