pub struct NoticeMessage {
pub channel_login: Option<String>,
pub message_text: String,
pub message_id: Option<String>,
pub source: IRCMessage,
}Expand description
A user-facing notice sent by the server.
Fields§
§channel_login: Option<String>The login name of the channel that this notice was sent to. There are cases where this
is missing, for example when a NOTICE message is sent in response to a failed login
attempt.
message_text: StringMessage content of the notice. This is some user-friendly string, e.g.
You are permanently banned from talking in <channel>.
message_id: Option<String>If present, a computer-readable string identifying the class/type of notice.
For example msg_banned. These message IDs are documented by Twitch here.
source: IRCMessageThe message that this NoticeMessage was parsed from.
Trait Implementations§
Source§impl Clone for NoticeMessage
impl Clone for NoticeMessage
Source§fn clone(&self) -> NoticeMessage
fn clone(&self) -> NoticeMessage
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 NoticeMessage
impl Debug for NoticeMessage
Source§impl<'de> Deserialize<'de> for NoticeMessage
impl<'de> Deserialize<'de> for NoticeMessage
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<NoticeMessage> for IRCMessage
impl From<NoticeMessage> for IRCMessage
Source§fn from(msg: NoticeMessage) -> IRCMessage
fn from(msg: NoticeMessage) -> IRCMessage
Converts to this type from the input type.
Source§impl PartialEq for NoticeMessage
impl PartialEq for NoticeMessage
Source§impl Serialize for NoticeMessage
impl Serialize for NoticeMessage
Source§impl TryFrom<IRCMessage> for NoticeMessage
impl TryFrom<IRCMessage> for NoticeMessage
Source§type Error = ServerMessageParseError
type Error = ServerMessageParseError
The type returned in the event of a conversion error.
Source§fn try_from(
source: IRCMessage,
) -> Result<NoticeMessage, ServerMessageParseError>
fn try_from( source: IRCMessage, ) -> Result<NoticeMessage, ServerMessageParseError>
Performs the conversion.
impl Eq for NoticeMessage
impl StructuralPartialEq for NoticeMessage
Auto Trait Implementations§
impl Freeze for NoticeMessage
impl RefUnwindSafe for NoticeMessage
impl Send for NoticeMessage
impl Sync for NoticeMessage
impl Unpin for NoticeMessage
impl UnwindSafe for NoticeMessage
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