pub struct Crumb { /* private fields */ }
Expand description
Crumb including the data of this line
Implementations§
Source§impl Crumb
impl Crumb
pub fn new_for_test( line_num: usize, position: usize, tails: Vec<Crumb>, keyword: Option<String>, view_content: String, content: String, comment_symbol_header: String, ignore: bool, ) -> Self
Sourcepub fn filter_keywords(&mut self, re: &Regex) -> bool
pub fn filter_keywords(&mut self, re: &Regex) -> bool
side effect: will change keyword to Some(_) if match successed
pub fn has_tail(&self) -> bool
pub fn new( line_num: usize, position: usize, content: String, comment_symbol_header: String, ) -> Self
Sourcepub fn all_lines_num(&self) -> Vec<usize>
pub fn all_lines_num(&self) -> Vec<usize>
return this crumb line_num and all tails line numbers if it has tails
Sourcepub fn all_lines_num_postion_pair(&self) -> Vec<(usize, usize)>
pub fn all_lines_num_postion_pair(&self) -> Vec<(usize, usize)>
return this crumb line numbers and the position of lines pairs
Sourcepub fn all_lines_num_postion_and_header_content(
&self,
) -> Vec<(usize, usize, &str, &str)>
pub fn all_lines_num_postion_and_header_content( &self, ) -> Vec<(usize, usize, &str, &str)>
return this crumb line numbers, the position, the header and content of lines pairs
pub fn add_ignore_flag(self) -> Self
pub fn is_ignore(&self) -> bool
pub fn list_format(&self) -> String
Trait Implementations§
impl Eq for Crumb
impl StructuralPartialEq for Crumb
Auto Trait Implementations§
impl Freeze for Crumb
impl RefUnwindSafe for Crumb
impl Send for Crumb
impl Sync for Crumb
impl Unpin for Crumb
impl UnwindSafe for Crumb
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