[][src]Struct tbot::markup::CodeBlock

#[must_use = "formatters need to be formatted with `markdown_v2` or `html`"]pub struct CodeBlock<C, L = &'static str> { /* fields omitted */ }

Formats a block of code. Can be created with code_block.

Implementations

impl<C, L: Deref<Target = str>> CodeBlock<C, L>[src]

pub fn language(self, language: L) -> Self[src]

Defines the langauge of the code block.

Panics

Panics if the language contains a line break or a quote.

Trait Implementations

impl<C: Clone, L: Clone> Clone for CodeBlock<C, L>[src]

impl<C: Copy, L: Copy> Copy for CodeBlock<C, L>[src]

impl<C: Debug, L: Debug> Debug for CodeBlock<C, L>[src]

impl<C: Eq, L: Eq> Eq for CodeBlock<C, L>[src]

impl<I, T, L> Formattable for CodeBlock<I, L> where
    &'a I: IntoIterator<Item = &'a T>,
    T: Deref<Target = str>,
    L: Deref<Target = str>, 
[src]

impl<I, T, L> Formattable for CodeBlock<I, L> where
    &'a I: IntoIterator<Item = &'a T>,
    T: Deref<Target = str>,
    L: Deref<Target = str>, 
[src]

impl<C: Hash, L: Hash> Hash for CodeBlock<C, L>[src]

impl<C: PartialEq, L: PartialEq> PartialEq<CodeBlock<C, L>> for CodeBlock<C, L>[src]

impl<C, L> StructuralEq for CodeBlock<C, L>[src]

impl<C, L> StructuralPartialEq for CodeBlock<C, L>[src]

Auto Trait Implementations

impl<C, L> RefUnwindSafe for CodeBlock<C, L> where
    C: RefUnwindSafe,
    L: RefUnwindSafe

impl<C, L> Send for CodeBlock<C, L> where
    C: Send,
    L: Send

impl<C, L> Sync for CodeBlock<C, L> where
    C: Sync,
    L: Sync

impl<C, L> Unpin for CodeBlock<C, L> where
    C: Unpin,
    L: Unpin

impl<C, L> UnwindSafe for CodeBlock<C, L> where
    C: UnwindSafe,
    L: UnwindSafe

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Formattable for T where
    T: Formattable + Formattable
[src]

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

impl<T> Instrument for T[src]

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

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> WithSubscriber for T[src]