pub struct LineNumbersOpts {
pub relative: bool,
pub align: Alignment,
pub main_align: Alignment,
pub show_wraps: bool,
pub on_the_right: bool,
}Expand description
Options for cosntructing a LineNumbers Widget
For most options, you can just set them in the Widget
directly (through a hook or something). Right now, the
only option exclusive to this struct is the on_the_right
option, which places the LineNumbers on the right, as
opposed to on the left.
Fields§
§relative: boolWether to show relative numbering
The default is false
align: AlignmentWhere to align the numbers
The default is Alignment::Left
main_align: AlignmentWhere to align the main line number
The default is Alignment::Right
show_wraps: boolWether to show wrapped line’s numbers
The default is false
on_the_right: boolPlace this Widget on the right, as opposed to on the left
The default is false
Implementations§
Source§impl LineNumbersOpts
impl LineNumbersOpts
Sourcepub fn push_on(self, pa: &mut Pass, buffer: &Handle) -> Handle<LineNumbers>
pub fn push_on(self, pa: &mut Pass, buffer: &Handle) -> Handle<LineNumbers>
Push the LineNumbers to a Handle
The Widget will be pushed on the “outside”. That is, if
there are other widgets pushed on the buffer, this one will be
placed around them.
Trait Implementations§
Source§impl Clone for LineNumbersOpts
impl Clone for LineNumbersOpts
Source§fn clone(&self) -> LineNumbersOpts
fn clone(&self) -> LineNumbersOpts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more