Struct Ast

struct Ast { ... }

A single node in the CommonMark AST.

The struct contains metadata about the node's position in the original document, and the core enum, NodeValue.

Fields

value: NodeValue

The node value itself.

sourcepos: Sourcepos

The positions in the source document this node comes from.

Implementations

impl Ast

fn new(value: NodeValue, start: LineColumn) -> Self

Create a new AST node with the given value.

impl Clone for Ast

fn clone(self: &Self) -> Ast

impl Debug for Ast

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

impl Eq for Ast

impl Freeze for Ast

impl PartialEq for Ast

fn eq(self: &Self, other: &Ast) -> bool

impl RefUnwindSafe for Ast

impl Send for Ast

impl StructuralPartialEq for Ast

impl Sync for Ast

impl Unpin for Ast

impl UnwindSafe for Ast

impl<T> Any for Ast

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Ast

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Ast

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

impl<T> CloneToUninit for Ast

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Ast

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Ast

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Ast

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for Ast

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

impl<T, U> TryInto for Ast

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