pub struct UserMessageRef<'a> {
pub content: &'a UserContent,
pub name: Option<&'a str>,
pub extensions: Option<&'a ExtraMap>,
}Expand description
Borrowed view returned by Message::as_user.
Use this when you want to inspect a user message’s multimodal content, optional participant name, or extensions without cloning the message.
Fields§
§content: &'a UserContentBorrowed user content.
name: Option<&'a str>Optional participant name.
extensions: Option<&'a ExtraMap>Borrowed provider-specific extensions.
Trait Implementations§
Source§impl<'a> Clone for UserMessageRef<'a>
impl<'a> Clone for UserMessageRef<'a>
Source§fn clone(&self) -> UserMessageRef<'a>
fn clone(&self) -> UserMessageRef<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for UserMessageRef<'a>
impl<'a> Debug for UserMessageRef<'a>
Source§impl<'a> PartialEq for UserMessageRef<'a>
impl<'a> PartialEq for UserMessageRef<'a>
impl<'a> Copy for UserMessageRef<'a>
impl<'a> Eq for UserMessageRef<'a>
impl<'a> StructuralPartialEq for UserMessageRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for UserMessageRef<'a>
impl<'a> RefUnwindSafe for UserMessageRef<'a>
impl<'a> Send for UserMessageRef<'a>
impl<'a> Sync for UserMessageRef<'a>
impl<'a> Unpin for UserMessageRef<'a>
impl<'a> UnsafeUnpin for UserMessageRef<'a>
impl<'a> UnwindSafe for UserMessageRef<'a>
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