pub struct WhisperMessage {
pub recipient_login: String,
pub sender: TwitchUserBasics,
pub message_text: String,
pub name_color: Option<RGBColor>,
pub badges: Vec<Badge>,
pub emotes: Vec<Emote>,
pub source: IRCMessage,
}Expand description
A incoming whisper message (a private user-to-user message).
Fields§
§recipient_login: StringThe login name of the receiving user (the logged in user).
sender: TwitchUserBasicsUser details of the user that sent us this whisper (the sending user).
message_text: StringThe text content of the message.
name_color: Option<RGBColor>Name color of the sending user.
badges: Vec<Badge>List of badges (that the sending user has) that should be displayed alongside the message.
emotes: Vec<Emote>A list of emotes in this message. Each emote replaces a part of the message_text.
These emotes are sorted in the order that they appear in the message.
source: IRCMessageThe message that this WhisperMessage was parsed from.
Trait Implementations§
Source§impl Clone for WhisperMessage
impl Clone for WhisperMessage
Source§fn clone(&self) -> WhisperMessage
fn clone(&self) -> WhisperMessage
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 Debug for WhisperMessage
impl Debug for WhisperMessage
Source§impl<'de> Deserialize<'de> for WhisperMessage
impl<'de> Deserialize<'de> for WhisperMessage
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
Source§impl From<WhisperMessage> for IRCMessage
impl From<WhisperMessage> for IRCMessage
Source§fn from(msg: WhisperMessage) -> IRCMessage
fn from(msg: WhisperMessage) -> IRCMessage
Converts to this type from the input type.
Source§impl PartialEq for WhisperMessage
impl PartialEq for WhisperMessage
Source§impl Serialize for WhisperMessage
impl Serialize for WhisperMessage
Source§impl TryFrom<IRCMessage> for WhisperMessage
impl TryFrom<IRCMessage> for WhisperMessage
Source§type Error = ServerMessageParseError
type Error = ServerMessageParseError
The type returned in the event of a conversion error.
Source§fn try_from(
source: IRCMessage,
) -> Result<WhisperMessage, ServerMessageParseError>
fn try_from( source: IRCMessage, ) -> Result<WhisperMessage, ServerMessageParseError>
Performs the conversion.
impl Eq for WhisperMessage
impl StructuralPartialEq for WhisperMessage
Auto Trait Implementations§
impl Freeze for WhisperMessage
impl RefUnwindSafe for WhisperMessage
impl Send for WhisperMessage
impl Sync for WhisperMessage
impl Unpin for WhisperMessage
impl UnwindSafe for WhisperMessage
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more