Skip to main content

CodeBlock

Struct CodeBlock 

Source
pub struct CodeBlock(/* private fields */);

Implementations§

Source§

impl CodeBlock

Source

pub fn info(&self) -> Option<CodeInfo>

Source

pub fn language(&self) -> Option<String>

Source

pub fn content_text(&self) -> String

Source

pub fn content_range(&self) -> Option<TextRange>

Source

pub fn is_executable_chunk(&self) -> bool

Source

pub fn is_display_code_block(&self) -> bool

Source

pub fn hashpipe_yaml_preamble(&self) -> Option<HashpipeYamlPreamble>

Source

pub fn inline_chunk_option_entries(&self) -> Vec<ChunkOptionEntry>

Source

pub fn hashpipe_chunk_option_entries(&self) -> Vec<ChunkOptionEntry>

Chunk options from the embedded hashpipe YAML block map. The preamble’s HASHPIPE_YAML_CONTENT carries a spliced YAML document (host-aligned ranges), so each top-level key: value entry becomes one option: cooked value, host-range spans, and a quoted flag from the scalar style. Non-scalar values (e.g. a fig-subcap: sequence) yield an entry with no value, matching the legacy option-line behavior.

Source

pub fn merged_chunk_option_entries(&self) -> Vec<ChunkOptionEntry>

Source

pub fn inline_chunk_options_node(&self) -> Option<ChunkOptions>

Source

pub fn chunk_label_entries(&self) -> Vec<ChunkLabelEntry>

Source

pub fn chunk_labels(&self) -> Vec<String>

Source

pub fn has_chunk_option_key_with_nonempty_value(&self, key_name: &str) -> bool

Source

pub fn has_chunk_label(&self) -> bool

Trait Implementations§

Source§

impl AstNode for CodeBlock

Source§

type Language = PanacheLanguage

Source§

fn can_cast(kind: SyntaxKind) -> bool

Source§

fn cast(syntax: SyntaxNode) -> Option<Self>

Source§

fn syntax(&self) -> &SyntaxNode

Source§

fn clone_for_update(&self) -> Self
where Self: Sized,

Source§

fn clone_subtree(&self) -> Self
where Self: Sized,

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.