Struct yarner_lib::CodeBlock [−][src]
A CodeBlock
is a block of code as defined by the input format.
Fields
line_number: usize
Source line number of the first code line
indent: String
The indent of this code block is in the documentation file
name: Option<String>
The name of this code block
is_unnamed: bool
Whether the code block was originally unnamed
language: Option<String>
The language this block was written in
Marks the code block as hidden from docs
is_file: bool
Marks the code block as a file-based entrypoint
is_alternative: bool
Marks the code block as fenced by alternative sequence
source: Vec<Line>
The source is the lines of code
source_file: Option<String>
Source file, for transcluded blocks
Implementations
impl CodeBlock
[src]
pub fn new(
line_number: usize,
indent: String,
language: Option<String>,
alternative: bool
) -> Self
[src]
line_number: usize,
indent: String,
language: Option<String>,
alternative: bool
) -> Self
Trait Implementations
impl Debug for CodeBlock
[src]
impl Default for CodeBlock
[src]
impl<'de> Deserialize<'de> for CodeBlock
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for CodeBlock
[src]
Auto Trait Implementations
impl RefUnwindSafe for CodeBlock
impl Send for CodeBlock
impl Sync for CodeBlock
impl Unpin for CodeBlock
impl UnwindSafe for CodeBlock
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,