#[non_exhaustive]pub enum MessageSource {
User,
System,
Agent(String),
}Expand description
Provenance of a message sent through session.send.
Source is independent of delivery mode. Leaving MessageOptions::source
unset omits the field and preserves the runtime’s default for user messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
User
A message from a human user.
System
An automated message from the integrating application.
Agent(String)
A message from the agent with this opaque sender ID.
Trait Implementations§
Source§impl Clone for MessageSource
impl Clone for MessageSource
Source§impl Debug for MessageSource
impl Debug for MessageSource
Source§impl<'de> Deserialize<'de> for MessageSource
impl<'de> Deserialize<'de> for MessageSource
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MessageSource
impl Display for MessageSource
impl Eq for MessageSource
Source§impl Hash for MessageSource
impl Hash for MessageSource
Source§impl PartialEq for MessageSource
impl PartialEq for MessageSource
Source§impl Serialize for MessageSource
impl Serialize for MessageSource
impl StructuralPartialEq for MessageSource
Auto Trait Implementations§
impl Freeze for MessageSource
impl RefUnwindSafe for MessageSource
impl Send for MessageSource
impl Sync for MessageSource
impl Unpin for MessageSource
impl UnsafeUnpin for MessageSource
impl UnwindSafe for MessageSource
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.