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, handle: &Handle) -> Handle<LineNumbers>
pub fn push_on(self, pa: &mut Pass, handle: &Handle) -> Handle<LineNumbers>
Push the LineNumbers to a Handle
Trait Implementations§
Source§impl Clone for LineNumbersOpts
impl Clone for LineNumbersOpts
Source§fn clone(&self) -> LineNumbersOpts
fn clone(&self) -> LineNumbersOpts
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LineNumbersOpts
impl Debug for LineNumbersOpts
Source§impl Default for LineNumbersOpts
impl Default for LineNumbersOpts
impl Copy for LineNumbersOpts
Auto Trait Implementations§
impl Freeze for LineNumbersOpts
impl RefUnwindSafe for LineNumbersOpts
impl Send for LineNumbersOpts
impl Sync for LineNumbersOpts
impl Unpin for LineNumbersOpts
impl UnwindSafe for LineNumbersOpts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.