[][src]Struct irc_rust::message::MessageBuilder

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

A MessageBuilder for a simpler generation of a message instead of building an string first.

Implementations

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

pub fn command(self, cmd: &'a str) -> MessageBuilder<'a>[src]

Set the command.

pub fn tag(self, key: &'a str, value: &'a str) -> MessageBuilder<'a>[src]

Set a tag.

pub fn prefix_name(self, name: &'a str) -> MessageBuilder<'a>[src]

Set a prefix.

pub fn prefix_user(self, user: &'a str) -> MessageBuilder<'a>[src]

Set a prefix.

pub fn prefix_host(self, host: &'a str) -> MessageBuilder<'a>[src]

Set a prefix.

pub fn param(self, param: &'a str) -> MessageBuilder<'a>[src]

Add a param.

pub fn set_param(self, index: usize, param: &'a str) -> MessageBuilder<'a>[src]

Set a param at the given index. If the index is below 0, it won't be set. If index >= length of the existing parameters it will be added to the end but not set as trailing. This doesn't allow to set the trailing parameter.

pub fn trailing(self, trailing: &'a str) -> MessageBuilder<'a>[src]

pub fn build(self) -> Message[src]

Create a Message instance and return if valid.

Auto Trait Implementations

impl<'a> RefUnwindSafe for MessageBuilder<'a>

impl<'a> Send for MessageBuilder<'a>

impl<'a> Sync for MessageBuilder<'a>

impl<'a> Unpin for MessageBuilder<'a>

impl<'a> UnwindSafe for MessageBuilder<'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.