pub enum Inline {
Roman(String),
Italic(String),
Bold(String),
LineBreak,
}
Expand description
A part of a text line.
Text will be escaped for ROFF. No inline escape sequences will be passed to ROFF. The text may contain newlines, but leading periods will be escaped so that they won’t be interpreted by ROFF as control lines.
Note that the strings stored in the variants are stored as they’re
received from the API user. The Line::render
function handles
escaping etc.
Variants§
Roman(String)
Text in the “roman” font, which is the normal font if nothing else is specified.
Italic(String)
Text in the italic (slanted) font.
Bold(String)
Text in a bold face font.
LineBreak
A hard line break. This is an inline element so it’s easy to insert a line break in a paragraph.
Trait Implementations§
Source§impl<S: Into<String>> From<S> for Inline
Turn a string slice into inline text in the roman font.
impl<S: Into<String>> From<S> for Inline
Turn a string slice into inline text in the roman font.
This is equivalent to the roman function, but may be more convenient to use.
impl Eq for Inline
impl StructuralPartialEq for Inline
Auto Trait Implementations§
impl Freeze for Inline
impl RefUnwindSafe for Inline
impl Send for Inline
impl Sync for Inline
impl Unpin for Inline
impl UnwindSafe for Inline
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