pub struct BufferLine<'a> { /* private fields */ }
Expand description
The buffer line, makes it possible to modify the printed message and other line data.
Implementations§
Source§impl<'a> BufferLine<'a>
impl<'a> BufferLine<'a>
Sourcepub fn prefix(&self) -> Cow<'_, str>
pub fn prefix(&self) -> Cow<'_, str>
Get the prefix of the line, everything left of the message separator
(usually |
) is considered the prefix.
Sourcepub fn set_prefix(&self, new_prefix: &str)
pub fn set_prefix(&self, new_prefix: &str)
Set the prefix to the given new value.
§Arguments
new_prefix
- The new prefix that should be set on the line.
Sourcepub fn set_message(&self, new_value: &str)
pub fn set_message(&self, new_value: &str)
Set the message to the given new value.
§Arguments
new_value
- The new message that should be set on the line.
Sourcepub fn set_date(&self, new_value: i64)
pub fn set_date(&self, new_value: i64)
Set the date to the given new value.
§Arguments
new_value
- The new date that should be set on the line.
Sourcepub fn date_printed(&self) -> i64
pub fn date_printed(&self) -> i64
Get the date the line was printed.
Sourcepub fn set_date_printed(&self, new_value: &str)
pub fn set_date_printed(&self, new_value: &str)
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.
Sourcepub fn highlighted(&self) -> bool
pub fn highlighted(&self) -> bool
Is the line highlighted.
Get the list of tags of the line.
Set the tags of the line to the new value.
§Arguments
new_value
- The new tags that should be set on the line.
Auto Trait Implementations§
impl<'a> Freeze for BufferLine<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more