pub struct PrintCfg {
pub wrap_method: WrapMethod,
pub indent_wrap: bool,
pub tab_stops: TabStops,
pub new_line: NewLine,
pub scrolloff: ScrollOff,
pub word_chars: WordChars,
}Expand description
Configuration options for printing.
Fields§
§wrap_method: WrapMethodHow to wrap the file.
indent_wrap: boolWether to indent wrapped lines or not.
tab_stops: TabStopsWhich places are considered a “tab stop”.
new_line: NewLineWether (and how) to show new lines.
scrolloff: ScrollOffThe horizontal and vertical gaps between the main
cursor and the edges of a [Label][crate::ui::Label].
word_chars: WordCharsCharacters that are considered to be part of a word.
Implementations§
source§impl PrintCfg
impl PrintCfg
pub fn new() -> Self
pub fn with_no_wrapping(self) -> Self
pub fn width_wrapped(self) -> Self
pub fn word_wrapped(self) -> Self
pub fn wrapped_on_cap(self, cap: usize) -> Self
pub fn indenting_wrap(self) -> Self
pub fn with_tabs_size(self, tab_size: usize) -> Self
pub fn with_new_line_as(self, char: char) -> Self
pub fn with_trailing_new_line_as(self, char: char) -> Self
pub fn with_scrolloff(self, x: usize, y: usize) -> Self
pub fn with_x_scrolloff(self, x_gap: usize) -> Self
pub fn with_y_scrolloff(self, y_gap: usize) -> Self
pub fn with_word_chars( self, word_chars: impl Iterator<Item = RangeInclusive<char>>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrintCfg
impl RefUnwindSafe for PrintCfg
impl Send for PrintCfg
impl Sync for PrintCfg
impl Unpin for PrintCfg
impl UnwindSafe for PrintCfg
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)