Struct ftd::code::Code[][src]

pub struct Code {
    pub caption: Rendered,
    pub lang: String,
    pub break_lines: bool,
    pub show_line_numbers: ShowLineNumbers,
    pub show_invisibles: bool,
    pub show_tabs: bool,
    pub tab_size: u8,
    pub pointers: HashMap<String, Rendered>,
    pub show: Vec<i32>,
    pub full: Option<String>,
    pub highlights: Vec<Highlight>,
    pub code: Rendered,
}

Fields

caption: Renderedlang: Stringbreak_lines: boolshow_line_numbers: ShowLineNumbersshow_invisibles: boolshow_tabs: booltab_size: u8pointers: HashMap<String, Rendered>show: Vec<i32>full: Option<String>highlights: Vec<Highlight>code: Rendered

Implementations

impl Code[src]

pub fn to_p1(&self) -> Section[src]

pub fn from_p1(p1: &Section) -> Result<Self, ParseError>[src]

pub fn with_caption(self, caption: &str) -> Self[src]

pub fn with_code(self, code: &str) -> Self[src]

pub fn with_lang(self, lang: &str) -> Self[src]

pub fn with_break_lines(self, v: bool) -> Self[src]

pub fn with_tab_size(self, tab_size: u8) -> Self[src]

pub fn with_show_tabs(self, v: bool) -> Self[src]

pub fn with_show_invisibles(self, v: bool) -> Self[src]

pub fn with_full(self, v: &str) -> Self[src]

pub fn with_show_line_numbers(self, v: ShowLineNumbers) -> Self[src]

Trait Implementations

impl Clone for Code[src]

impl Debug for Code[src]

impl Default for Code[src]

impl PartialEq<Code> for Code[src]

impl Serialize for Code[src]

impl StructuralPartialEq for Code[src]

impl ToString for Code[src]

Auto Trait Implementations

impl RefUnwindSafe for Code

impl Send for Code

impl Sync for Code

impl Unpin for Code

impl UnwindSafe for Code

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Any + Clone

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any