[−][src]Struct irc_rust::MessageBuilder
A MessageBuilder for a simpler generation of a message instead of building an string first.
Implementations
impl<'a> Message<'a>
[src]
pub fn new() -> Self
[src]
Creates a new empty builder.
pub fn command(self, cmd: &'a str) -> Message<'a>
[src]
Set the command.
pub fn tag(self, key: &'a str, value: &'a str) -> Message<'a>
[src]
Set a tag.
pub fn prefix_name(self, name: &'a str) -> Message<'a>
[src]
Set a prefix.
pub fn prefix_user(self, user: &'a str) -> Message<'a>
[src]
Set a prefix.
pub fn prefix_host(self, host: &'a str) -> Message<'a>
[src]
Set a prefix.
pub fn param(self, param: &'a str) -> Message<'a>
[src]
Add a param.
pub fn set_param(self, index: usize, param: &'a str) -> Message<'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) -> Message<'a>
[src]
pub fn build(self) -> Result<Message, MessageBuildError>
[src]
Create a Message instance and return if valid.
Trait Implementations
impl<'a> Clone for Message<'a>
[src]
impl<'a> Debug for Message<'a>
[src]
impl<'a> Default for Message<'a>
[src]
impl<'a> Eq for Message<'a>
[src]
impl<'a> PartialEq<Message<'a>> for Message<'a>
[src]
impl<'a> StructuralEq for Message<'a>
[src]
impl<'a> StructuralPartialEq for Message<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Message<'a>
impl<'a> Send for Message<'a>
impl<'a> Sync for Message<'a>
impl<'a> Unpin for Message<'a>
impl<'a> UnwindSafe for Message<'a>
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,