pub struct ReflowConfig<'a> {
pub textwidth: usize,
pub line_comment: Option<&'a str>,
}Expand description
Everything the engine needs that it cannot derive from the text.
Fields§
§textwidth: usizeTarget column. Always a real column — autowrap=off is what
turns wrapping off, so this never carries a “disabled” sentinel.
line_comment: Option<&'a str>The language’s line-comment leader (//, #, --), if it has
one. None for markdown, plain text and any language whose
comment syntax is undeclared — reflow then treats indentation
alone as the prefix, which is the right answer for prose.
Trait Implementations§
Source§impl<'a> Clone for ReflowConfig<'a>
impl<'a> Clone for ReflowConfig<'a>
Source§fn clone(&self) -> ReflowConfig<'a>
fn clone(&self) -> ReflowConfig<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ReflowConfig<'a>
Auto Trait Implementations§
impl<'a> Freeze for ReflowConfig<'a>
impl<'a> RefUnwindSafe for ReflowConfig<'a>
impl<'a> Send for ReflowConfig<'a>
impl<'a> Sync for ReflowConfig<'a>
impl<'a> Unpin for ReflowConfig<'a>
impl<'a> UnsafeUnpin for ReflowConfig<'a>
impl<'a> UnwindSafe for ReflowConfig<'a>
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