Struct twitch_irc::message::IRCTags
source · [−]Expand description
A map of key-value IRCv3 tags.
Examples
use twitch_irc::message::IRCTags;
use twitch_irc::message::AsRawIRC;
use maplit::hashmap;
let tags = IRCTags::parse("key=value;key2=value2;key3");
assert_eq!(tags, hashmap! {
"key".to_owned() => Some("value".to_owned()),
"key2".to_owned() => Some("value2".to_owned()),
"key3".to_owned() => None
})Tuple Fields
0: HashMap<String, Option<String>>Implementations
Trait Implementations
sourceimpl AsRawIRC for IRCTags
impl AsRawIRC for IRCTags
sourcefn format_as_raw_irc(&self, f: &mut Formatter<'_>) -> Result
fn format_as_raw_irc(&self, f: &mut Formatter<'_>) -> Result
Writes the raw IRC message to the given formatter.
sourcefn as_raw_irc(&self) -> Stringwhere
Self: Sized,
fn as_raw_irc(&self) -> Stringwhere
Self: Sized,
Creates a new string with the raw IRC message. Read more
sourceimpl<'de> Deserialize<'de> for IRCTags
impl<'de> Deserialize<'de> for IRCTags
sourcefn 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
sourceimpl PartialEq<HashMap<String, Option<String>, RandomState>> for IRCTags
impl PartialEq<HashMap<String, Option<String>, RandomState>> for IRCTags
sourceimpl PartialEq<IRCTags> for HashMap<String, Option<String>>
impl PartialEq<IRCTags> for HashMap<String, Option<String>>
impl Eq for IRCTags
impl StructuralEq for IRCTags
impl StructuralPartialEq for IRCTags
Auto Trait Implementations
impl RefUnwindSafe for IRCTags
impl Send for IRCTags
impl Sync for IRCTags
impl Unpin for IRCTags
impl UnwindSafe for IRCTags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.