pub struct LineNumbers<U: Ui> { /* private fields */ }Expand description
Shows a column of line numbers beside the File
This can be configured through LineNumbers::cfg, in order to
get, for example: relative numbering, different alignment,
hidden/shown wrapped lines, etc.
Implementations§
Source§impl<U: Ui> LineNumbers<U>
impl<U: Ui> LineNumbers<U>
Sourcepub fn relative(&mut self) -> &mut Self
pub fn relative(&mut self) -> &mut Self
Relative numbering, cursor line is 0, surrounding is 1, etc
Sourcepub fn align_left(&mut self) -> &mut Self
pub fn align_left(&mut self) -> &mut Self
Aligns all numbers left
If you want the main line’s number to be aligned differently,
call one of the align_main_* functions after this one.
Sourcepub fn align_center(&mut self) -> &mut Self
pub fn align_center(&mut self) -> &mut Self
Aligns all numbers to the center
If you want the main line’s number to be aligned differently,
call one of the align_main_* functions after this one.
Sourcepub fn align_right(&mut self) -> &mut Self
pub fn align_right(&mut self) -> &mut Self
Aligns all numbers right
If you want the main line’s number to be aligned differently,
call one of the align_main_* functions after this one.
Sourcepub fn align_main_left(&mut self) -> &mut Self
pub fn align_main_left(&mut self) -> &mut Self
Aligns onle the main line’s number to the left
Sourcepub fn align_main_center(&mut self) -> &mut Self
pub fn align_main_center(&mut self) -> &mut Self
Aligns onle the main line’s number to the center
Sourcepub fn align_main_right(&mut self) -> &mut Self
pub fn align_main_right(&mut self) -> &mut Self
Aligns onle the main line’s number to the right
Sourcepub fn show_wraps(&mut self) -> &mut Self
pub fn show_wraps(&mut self) -> &mut Self
Shows wrapping lines, is false by default
Sourcepub fn hide_wraps(&mut self) -> &mut Self
pub fn hide_wraps(&mut self) -> &mut Self
Hides wrapping lines, is true by default