Enum twitch_message::Prefix
source · pub enum Prefix<'a> {
User {
name: Cow<'a, str>,
user: Cow<'a, str>,
host: Cow<'a, str>,
},
Server {
host: Cow<'a, str>,
},
None,
}
Expand description
An IRC-styled prefix.
A prefix is attached to certain messages denoting whom sent it.
Variants§
User
Fields
A user prefix.
This is attached for messages sent by a user
Currently, with Twitch, only name
is is relevant
Server
A server prefix.
This is attached for messages sent by the server
None
No prefix was attached
Implementations§
Trait Implementations§
source§impl<'de, 'a> Deserialize<'de> for Prefix<'a>
impl<'de, 'a> Deserialize<'de> for Prefix<'a>
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<'a> IntoStatic for Prefix<'a>where
'static: 'a,
impl<'a> IntoStatic for Prefix<'a>where
'static: 'a,
§type Output = Prefix<'static>
type Output = Prefix<'static>
Output of
IntoStatic::into_static
. Read moresource§fn into_static(self) -> Self::Output
fn into_static(self) -> Self::Output
This method casts
self
between Self<'a>
and Self<'static>
.