Struct CodefenceMeta

#[non_exhaustive]
pub struct CodefenceMeta<'a> { pub lang: &'a str, pub meta: &'a str, pub code: &'a str, pub sourcepos: Option<Sourcepos> }

Information about a codefence 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 codefence info string after the language token, trimmed.

code: &'a str

The block content.

sourcepos: Option<Sourcepos>

Source position information for the code fence, if any.

Implementations

impl<'a> CodefenceMeta<'a>

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

Create a new CodefenceMeta.

Trait Implementations

impl<'a> Clone for CodefenceMeta<'a>

fn clone(&self) -> Self

impl<'a> Debug for CodefenceMeta<'a>

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

Auto Trait Implementations

impl<'a> Freeze for CodefenceMeta<'a>

impl<'a> RefUnwindSafe for CodefenceMeta<'a>

impl<'a> Send for CodefenceMeta<'a>

impl<'a> Sync for CodefenceMeta<'a>

impl<'a> Unpin for CodefenceMeta<'a>

impl<'a> UnsafeUnpin for CodefenceMeta<'a>

impl<'a> UnwindSafe for CodefenceMeta<'a>

Blanket Implementations

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

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

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

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

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

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

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

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

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

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

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