Struct GutterConfig
pub struct GutterConfig {
pub enabled: bool,
pub width: f32,
pub line_numbers: bool,
pub fold_markers: bool,
}Expand description
Gutter controls for code-oriented editor frames.
Width is logical pixels. Viewport construction treats disabled, zero, or negative width as no gutter and clamps positive width to content width.
§Examples
use ailloli_ui_editor::GutterConfig;
let gutter = GutterConfig::default();
assert_eq!(gutter.width, 48.0);
assert!(gutter.enabled && gutter.line_numbers && gutter.fold_markers);Fields§
§enabled: boolWhether any gutter space is reserved.
width: f32Requested gutter width in logical pixels.
line_numbers: boolWhether line-number items are emitted.
fold_markers: boolWhether fold marker/guide items are emitted.
Trait Implementations§
§impl Clone for GutterConfig
impl Clone for GutterConfig
§fn clone(&self) -> GutterConfig
fn clone(&self) -> GutterConfig
Returns a copy 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 more§impl Debug for GutterConfig
impl Debug for GutterConfig
§impl Default for GutterConfig
Supplies an enabled 48-logical-pixel gutter with numbers and folds.
impl Default for GutterConfig
Supplies an enabled 48-logical-pixel gutter with numbers and folds.
§fn default() -> GutterConfig
fn default() -> GutterConfig
Returns the documented gutter defaults.
§impl PartialEq for GutterConfig
impl PartialEq for GutterConfig
impl Copy for GutterConfig
impl StructuralPartialEq for GutterConfig
Auto Trait Implementations§
impl Freeze for GutterConfig
impl RefUnwindSafe for GutterConfig
impl Send for GutterConfig
impl Sync for GutterConfig
impl Unpin for GutterConfig
impl UnwindSafe for GutterConfig
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.