Struct SyntaxHighlightMeta

#[non_exhaustive]
pub struct SyntaxHighlightMeta<'a> { pub lang: &'a str, pub meta: &'a str, pub code: &'a str }

Information about a code block given to the adapter implementation.

Fields

lang: &'a str

Name of the programming language (the first token of the info string).

meta: &'a str

The remaining info string after the language token, trimmed.

code: &'a str

The source code to be syntax highlighted.

Implementations

impl<'a> SyntaxHighlightMeta<'a>

fn new(lang: &'a str, meta: &'a str, code: &'a str) -> Self

Create a new SyntaxHighlightMeta.

Trait Implementations

impl<'a> Clone for SyntaxHighlightMeta<'a>

fn clone(&self) -> Self

impl<'a> Debug for SyntaxHighlightMeta<'a>

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

Auto Trait Implementations

impl<'a> Freeze for SyntaxHighlightMeta<'a>

impl<'a> RefUnwindSafe for SyntaxHighlightMeta<'a>

impl<'a> Send for SyntaxHighlightMeta<'a>

impl<'a> Sync for SyntaxHighlightMeta<'a>

impl<'a> Unpin for SyntaxHighlightMeta<'a>

impl<'a> UnsafeUnpin for SyntaxHighlightMeta<'a>

impl<'a> UnwindSafe for SyntaxHighlightMeta<'a>

Blanket Implementations

impl<F, T, S> SimdInto<T, S> for SyntaxHighlightMeta<'a> where T: SimdFrom<F, S>, S: Simd,

impl<T> Any for SyntaxHighlightMeta<'a> where T: 'static + ?Sized,

impl<T> Borrow<T> for SyntaxHighlightMeta<'a> where T: ?Sized,

impl<T> BorrowMut<T> for SyntaxHighlightMeta<'a> where T: ?Sized,

impl<T> CloneToUninit for SyntaxHighlightMeta<'a> where T: Clone,

impl<T> From<T> for SyntaxHighlightMeta<'a>

impl<T> ToOwned for SyntaxHighlightMeta<'a> where T: Clone,

impl<T, S> SimdFrom<T, S> for SyntaxHighlightMeta<'a> where S: Simd,

impl<T, U> Into<U> for SyntaxHighlightMeta<'a> where U: From<T>,

impl<T, U> TryFrom<U> for SyntaxHighlightMeta<'a> where U: Into<T>,

impl<T, U> TryInto<U> for SyntaxHighlightMeta<'a> where U: TryFrom<T>,