[][src]Struct weechat::buffer::BufferLine

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

The buffer line, makes it possible to modify the printed message and other line data.

Implementations

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

pub fn prefix(&self) -> Cow<'_, str>[src]

Get the prefix of the line, everything left of the message separator (usually |) is considered the prefix.

pub fn set_prefix(&self, new_prefix: &str)[src]

Set the prefix to the given new value.

Arguments

  • new_prefix - The new prefix that should be set on the line.

pub fn message(&self) -> Cow<'_, str>[src]

Get the message of the line.

pub fn set_message(&self, new_value: &str)[src]

Set the message to the given new value.

Arguments

  • new_value - The new message that should be set on the line.

pub fn date(&self) -> i64[src]

Get the date of the line.

pub fn set_date(&self, new_value: i64)[src]

Set the date to the given new value.

Arguments

  • new_value - The new date that should be set on the line.

pub fn date_printed(&self) -> i64[src]

Get the date the line was printed.

pub fn set_date_printed(&self, new_value: &str)[src]

Set the date the line was printed to the given new value.

Arguments

  • new_value - The new date that should be set on the line.

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

Is the line highlighted.

pub fn tags(&self) -> Vec<Cow<'_, str>>[src]

Get the list of tags of the line.

pub fn set_tags(&self, new_value: &[&str])[src]

Set the tags of the line to the new value.

Arguments

  • new_value - The new tags that should be set on the line.

pub fn update(&self, data: LineData<'a>)[src]

Update multiple fields of the line at once.

Arguments

  • data - LineData that contains new values that should be set on the line.

Example


let new_line = LineData {
    message: Some("Hello world"),
    tags: Some(&["First", "Second tag"]),
    .. Default::default()
};

line.update(new_line)

Auto Trait Implementations

impl<'a> !RefUnwindSafe for BufferLine<'a>

impl<'a> !Send for BufferLine<'a>

impl<'a> !Sync for BufferLine<'a>

impl<'a> Unpin for BufferLine<'a>

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