pub struct TypographyOptions { /* private fields */ }Expand description
Configuration for the optional typography pass.
Implementations§
Source§impl TypographyOptions
impl TypographyOptions
Sourcepub const fn new(language: TypographyLanguage) -> Self
pub const fn new(language: TypographyLanguage) -> Self
Creates typography options for one explicit language.
Dash and ellipsis conversion are enabled. The pass never detects a language or changes languages within a document.
Sourcepub const fn with_dashes(self, enabled: bool) -> Self
pub const fn with_dashes(self, enabled: bool) -> Self
Enables or disables dash conversion independently of other rules.
Sourcepub const fn with_ellipses(self, enabled: bool) -> Self
pub const fn with_ellipses(self, enabled: bool) -> Self
Enables or disables ellipsis conversion independently of other rules.
Sourcepub const fn with_guillemet_digraphs(self, enabled: bool) -> Self
pub const fn with_guillemet_digraphs(self, enabled: bool) -> Self
Enables conversion of parser-preserved <<…>> digraphs.
The parser’s guillemet_digraphs option must also be enabled so the
enclosed text is available to this pass.
Sourcepub const fn language(self) -> TypographyLanguage
pub const fn language(self) -> TypographyLanguage
Returns the configured language.
Sourcepub const fn guillemet_digraphs(self) -> bool
pub const fn guillemet_digraphs(self) -> bool
Returns whether <<…>> digraphs are converted by this pass.
Trait Implementations§
Source§impl Clone for TypographyOptions
impl Clone for TypographyOptions
impl Copy for TypographyOptions
Source§impl Debug for TypographyOptions
impl Debug for TypographyOptions
impl Eq for TypographyOptions
Source§impl PartialEq for TypographyOptions
impl PartialEq for TypographyOptions
impl StructuralPartialEq for TypographyOptions
Auto Trait Implementations§
impl Forget for TypographyOptions
impl Freeze for TypographyOptions
impl Move for TypographyOptions
impl RefUnwindSafe for TypographyOptions
impl Send for TypographyOptions
impl Sync for TypographyOptions
impl Unpin for TypographyOptions
impl UnsafeUnpin for TypographyOptions
impl UnwindSafe for TypographyOptions
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