[][src]Struct orgize::Org

pub struct Org<'a> { /* fields omitted */ }

Implementations

impl<'_> Org<'_>[src]

pub fn document(&self) -> Document[src]

Returns the Document.

pub fn headlines(&self) -> impl Iterator<Item = Headline> + '_[src]

Returns an iterator of Headlines.

impl<'a> Org<'a>[src]

pub fn new() -> Org<'static>[src]

Creates a new empty Org struct.

pub fn parse(text: &'a str) -> Org<'a>[src]

Parses string text into Org struct.

pub fn parse_string(text: String) -> Org<'static>[src]

Likes parse, but accepts String.

pub fn parse_custom(text: &'a str, config: &ParseConfig) -> Org<'a>[src]

Parses string text into Org struct with custom ParseConfig.

pub fn parse_string_custom(text: String, config: &ParseConfig) -> Org<'static>[src]

Likes parse_custom, but accepts String.

pub fn arena(&self) -> &Arena<Element<'a>>[src]

Returns a reference to the underlay arena.

pub fn arena_mut(&mut self) -> &mut Arena<Element<'a>>[src]

Returns a mutual reference to the underlay arena.

pub fn iter<'b>(&'b self) -> impl Iterator<Item = Event<'a, 'b>> + 'b[src]

Returns an iterator of Events.

pub fn keywords(&self) -> impl Iterator<Item = &Keyword>[src]

Returns an iterator of Keywords.

pub fn write_html<W>(&self, writer: W) -> Result<(), Error> where
    W: Write
[src]

Writes an Org struct as html format.

pub fn write_html_custom<W, H, E>(
    &self,
    writer: W,
    handler: &mut H
) -> Result<(), E> where
    W: Write,
    E: From<Error>,
    H: HtmlHandler<E>, 
[src]

Writes an Org struct as html format with custom HtmlHandler.

pub fn write_org<W>(&self, writer: W) -> Result<(), Error> where
    W: Write
[src]

Writes an Org struct as org format.

pub fn write_org_custom<W, H, E>(
    &self,
    writer: W,
    handler: &mut H
) -> Result<(), E> where
    W: Write,
    E: From<Error>,
    H: OrgHandler<E>, 
[src]

Writes an Org struct as org format with custom OrgHandler.

impl<'_> Org<'_>[src]

pub fn validate(&self) -> Vec<ValidationError>[src]

Validates an Org struct.

Trait Implementations

impl Default for Org<'static>[src]

impl<'a> Index<NodeId> for Org<'a>[src]

type Output = Element<'a>

The returned type after indexing.

impl<'a> IndexMut<NodeId> for Org<'a>[src]

impl<'_> Serialize for Org<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Org<'a>

impl<'a> Send for Org<'a>

impl<'a> Sync for Org<'a>

impl<'a> Unpin for Org<'a>

impl<'a> UnwindSafe for Org<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.