GraphNode

Enum GraphNode 

Source
pub enum GraphNode {
    Empty,
    Document(Document),
    Section(Section),
    Quote(Quote),
    BulletList(BulletList),
    OrderedList(OrderedList),
    Leaf(Leaf),
    Raw(RawLeaf),
    HorizontalRule(HorizontalRule),
    Reference(Reference),
    Table(Table),
}

Variants§

§

Empty

§

Document(Document)

§

Section(Section)

§

Quote(Quote)

§

BulletList(BulletList)

§

OrderedList(OrderedList)

§

Leaf(Leaf)

§

Raw(RawLeaf)

§

HorizontalRule(HorizontalRule)

§

Reference(Reference)

§

Table(Table)

Implementations§

Source§

impl GraphNode

Source

pub fn prev_id(&self) -> MaybeNodeId

Source

pub fn id(&self) -> NodeId

Source

pub fn is_ref(&self) -> bool

Source

pub fn is_empty(&self) -> bool

Source

pub fn is_leaf(&self) -> bool

Source

pub fn is_table(&self) -> bool

Source

pub fn is_ordered_list(&self) -> bool

Source

pub fn is_bullet_list(&self) -> bool

Source

pub fn is_document(&self) -> bool

Source

pub fn is_raw_leaf(&self) -> bool

Source

pub fn is_list(&self) -> bool

Source

pub fn is_quote(&self) -> bool

Source

pub fn is_rule(&self) -> bool

Source

pub fn is_section(&self) -> bool

Source

pub fn is_reference(&self) -> bool

Source

pub fn is_horizontal_rule(&self) -> bool

Source

pub fn is_raw(&self) -> bool

Source

pub fn is_root(&self) -> bool

Source

pub fn is_reference_to(&self, key: &Key) -> bool

Source

pub fn line_id(&self) -> MaybeLineId

Source

pub fn next_id(&self) -> MaybeNodeId

Source

pub fn to_symbol(&self) -> String

Source

pub fn child_id(&self) -> MaybeNodeId

Source

pub fn is_parent_of(&self, other: NodeId) -> bool

Source

pub fn is_prev_of(&self, other: NodeId) -> bool

Source

pub fn set_next_id(&mut self, next: NodeId)

Source

pub fn set_child_id(&mut self, child: NodeId)

Source

pub fn insertable(&self) -> bool

Source

pub fn new_leaf(prev: NodeId, id: NodeId, line: LineId) -> GraphNode

Source

pub fn new_raw_leaf( prev: NodeId, id: NodeId, content: String, lang: Option<String>, ) -> GraphNode

Source

pub fn new_table( prev: NodeId, id: NodeId, header: Vec<LineId>, alignment: Vec<ColumnAlignment>, rows: Vec<Vec<LineId>>, ) -> GraphNode

Source

pub fn new_ref( prev: NodeId, id: NodeId, key: Key, text: String, reference_type: ReferenceType, ) -> GraphNode

Source

pub fn new_bullet_list(prev: NodeId, id: NodeId) -> GraphNode

Source

pub fn new_ordered_list(prev: NodeId, id: NodeId) -> GraphNode

Source

pub fn new_quote(prev: NodeId, id: NodeId) -> GraphNode

Source

pub fn new_rule(prev: NodeId, id: NodeId) -> GraphNode

Source

pub fn new_section(prev: NodeId, id: NodeId, line: LineId) -> GraphNode

Source

pub fn new_root(key: Key, id: NodeId, metadata: Option<String>) -> GraphNode

Source

pub fn is_ordered(&self) -> bool

Source

pub fn key(&self) -> Option<Key>

Source

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

Source

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

Source

pub fn table_header(&self) -> Option<Vec<LineId>>

Source

pub fn table_rows(&self) -> Option<Vec<Vec<LineId>>>

Source

pub fn table_alignment(&self) -> Option<Vec<ColumnAlignment>>

Source

pub fn ref_key(&self) -> Option<Key>

Source

pub fn ref_type(&self) -> Option<ReferenceType>

Source

pub fn ref_text(&self) -> String

Trait Implementations§

Source§

impl Clone for GraphNode

Source§

fn clone(&self) -> GraphNode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GraphNode

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for GraphNode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for GraphNode

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> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V