pub struct Style {
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikethrough: bool,
pub role: Role,
pub baseline: Baseline,
pub token: Option<Token>,
}Expand description
Fields§
§bold: bool§italic: bool§underline: bool§strikethrough: bool§role: RoleThe typographic role — Role::Body for ordinary text.
baseline: BaselineWhich line the glyph sits on — Baseline::Normal for ordinary text.
token: Option<Token>What a code glyph is to its language — None for every glyph outside a
highlighted fenced block, which is every glyph there was before syntax
highlighting. Only meaningful beside Role::Code; a frontend that
ignores it draws code in one colour, as every frontend once did.
Implementations§
Source§impl Style
impl Style
pub const fn bold(self) -> Self
pub const fn italic(self) -> Self
pub const fn underline(self) -> Self
pub const fn strikethrough(self) -> Self
pub const fn role(self, r: Role) -> Self
pub const fn baseline(self, b: Baseline) -> Self
pub const fn token(self, t: Option<Token>) -> Self
Trait Implementations§
impl Copy for Style
impl Eq for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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