[go: up one dir, main page]

Enum Inline

Source
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 Clone for Inline

Source§

fn clone(&self) -> Inline

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Inline

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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.

Source§

fn from(s: S) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Inline

Source§

fn eq(&self, other: &Inline) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Inline

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.