pub struct LocList {
pub locs: Vec<Loc>,
}Expand description
A list of Lines of Code
To sort it, you focus it, which specifies the area to sort, then you call sort it.
Fields§
§locs: Vec<Loc>Implementations§
source§impl LocList
impl LocList
pub fn read<R: BufRead>(reader: R, lang: Language) -> CsResult<Self>
pub fn read_str(s: &str, lang: Language) -> CsResult<LocList>
pub fn focus_all(self) -> CsResult<Focused>
pub fn focus(self, range: LineNumberRange) -> CsResult<Focused>
pub fn focus_around_line_index(self, line_idx: LineIndex) -> CsResult<Focused>
pub fn focus_around_line_number( self, line_number: LineNumber ) -> CsResult<Focused>
pub fn print_debug(&self, label: &str)
pub fn has_content(&self) -> bool
pub fn las_significant_char(&self) -> Option<char>
pub fn last_line_with_content(&self) -> Option<&Loc>
pub fn is_complete(&self) -> bool
pub fn into_blocks(self) -> Vec<LocList>
pub fn range_around_idx(&self, line_idx: LineIndex) -> CsResult<LineNumberRange>
Trait Implementations§
source§impl Ord for LocList
impl Ord for LocList
source§impl PartialEq for LocList
impl PartialEq for LocList
source§impl PartialOrd for LocList
impl PartialOrd for LocList
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for LocList
Auto Trait Implementations§
impl Freeze for LocList
impl RefUnwindSafe for LocList
impl Send for LocList
impl Sync for LocList
impl Unpin for LocList
impl UnwindSafe for LocList
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