Struct broot::display::MatchedString
source · [−]pub struct MatchedString<'a> {
pub name_match: Option<NameMatch>,
pub string: &'a str,
pub base_style: &'a CompoundStyle,
pub match_style: &'a CompoundStyle,
pub display_width: Option<usize>,
pub align: Alignment,
}
Fields
name_match: Option<NameMatch>
string: &'a str
base_style: &'a CompoundStyle
match_style: &'a CompoundStyle
display_width: Option<usize>
align: Alignment
Implementations
sourceimpl<'a, 'w> MatchedString<'a>
impl<'a, 'w> MatchedString<'a>
pub fn new(
name_match: Option<NameMatch>,
string: &'a str,
base_style: &'a CompoundStyle,
match_style: &'a CompoundStyle
) -> Self
sourcepub fn split_on_last(&mut self, sep: char) -> Option<Self>
pub fn split_on_last(&mut self, sep: char) -> Option<Self>
If the string contains sep, then cut the tail of this matched string and return it. Note: a non none display_width currently prevents splitting (i.e. it’s not yet implemented and would involve compute width)
pub fn fill(&mut self, width: usize, align: Alignment)
pub fn queue_on<W>(&self, cw: &mut CropWriter<'w, W>) -> Result<(), Error>where
W: Write,
Auto Trait Implementations
impl<'a> RefUnwindSafe for MatchedString<'a>
impl<'a> Send for MatchedString<'a>
impl<'a> Sync for MatchedString<'a>
impl<'a> Unpin for MatchedString<'a>
impl<'a> UnwindSafe for MatchedString<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more