[−][src]Struct twitch_irc::message::IRCTags
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 })
Implementations
impl IRCTags
[src]
pub fn new() -> IRCTags
[src]
Creates a new empty map of tags.
pub fn parse(source: &str) -> IRCTags
[src]
Parses a new set of tags from their wire-format representation.
source
should be specified without the leading @
present in the full IRC tags.
Panics
Panics if source
is an empty string.
Trait Implementations
impl AsRawIRC for IRCTags
[src]
fn format_as_raw_irc(&self, f: &mut Formatter<'_>) -> Result
[src]
fn as_raw_irc(&self) -> String where
Self: Sized,
[src]
Self: Sized,
impl Clone for IRCTags
[src]
impl Debug for IRCTags
[src]
impl Default for IRCTags
[src]
impl From<HashMap<String, Option<String>, RandomState>> for IRCTags
[src]
impl PartialEq<HashMap<String, Option<String>, RandomState>> for IRCTags
[src]
fn eq(&self, other: &HashMap<String, Option<String>, RandomState>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<IRCTags> for IRCTags
[src]
impl PartialEq<IRCTags> for HashMap<String, Option<String>>
[src]
impl StructuralPartialEq for IRCTags
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,