[][src]Struct ellidri_tokens::TagBuffer

pub struct TagBuffer<'a> { /* fields omitted */ }

Helper to build the tags of an IRC message.

Methods

impl<'a> TagBuffer<'a>[src]

pub fn is_empty(&self) -> bool[src]

Whether the buffer has tags in it or not.

pub fn tag<T>(self, key: &str, value: Option<T>) -> Self where
    T: Display
[src]

Adds a new tag to the buffer, with the given key and value.

pub fn save_tags_len(self, out: &mut usize) -> Self[src]

Writes the length of tags in out.

Use this to know the start of the prefix or command.

pub fn prefixed_command<C>(self, prefix: &str, cmd: C) -> MessageBuffer<'a> where
    C: Into<Command>, 
[src]

Starts building a message with the given prefix and command.

Auto Trait Implementations

impl<'a> RefUnwindSafe for TagBuffer<'a>

impl<'a> Send for TagBuffer<'a>

impl<'a> Sync for TagBuffer<'a>

impl<'a> Unpin for TagBuffer<'a>

impl<'a> !UnwindSafe for TagBuffer<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.