[−][src]Struct tbot::markup::CodeBlock
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]
&'a I: IntoIterator<Item = &'a T>,
T: Deref<Target = str>,
L: Deref<Target = str>,
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]
&'a I: IntoIterator<Item = &'a T>,
T: Deref<Target = str>,
L: Deref<Target = str>,
impl<C: Hash, L: Hash> Hash for CodeBlock<C, L>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<C: PartialEq, L: PartialEq> PartialEq<CodeBlock<C, L>> for CodeBlock<C, L>
[src]
fn eq(&self, other: &CodeBlock<C, L>) -> bool
[src]
fn ne(&self, other: &CodeBlock<C, L>) -> bool
[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,
C: RefUnwindSafe,
L: RefUnwindSafe,
impl<C, L> Send for CodeBlock<C, L> where
C: Send,
L: Send,
C: Send,
L: Send,
impl<C, L> Sync for CodeBlock<C, L> where
C: Sync,
L: Sync,
C: Sync,
L: Sync,
impl<C, L> Unpin for CodeBlock<C, L> where
C: Unpin,
L: Unpin,
C: Unpin,
L: Unpin,
impl<C, L> UnwindSafe for CodeBlock<C, L> where
C: UnwindSafe,
L: UnwindSafe,
C: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Formattable for T where
T: Formattable + Formattable,
[src]
T: Formattable + Formattable,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,