[][src]Struct org::org::Org

pub struct Org { /* fields omitted */ }

Org data structure.

Methods

impl Org[src]

pub fn new() -> Org[src]

Returns an empty root-level Org struct.

pub fn from_file(fname: &str) -> Result<Org>[src]

Reads an Org struct from a given file path.

pub fn from_vec(contents: &[String]) -> Result<Org>[src]

Reads an Org struct from contents.

pub fn to_file(&self, fname: &str) -> Result<()>[src]

Writes an Org struct to a file.

pub fn to_file_crlf(&self, fname: &str) -> Result<()>[src]

Writes an Org struct to a file using carriage returns with a line feed (CRLF).

pub fn to_vec(&self) -> Vec<String>[src]

Writes an Org struct to a Vec<String>.

pub fn depth(&self) -> usize[src]

Returns the depth of the tree.

pub fn heading(&self) -> &str[src]

Returns the heading of the tree.

pub fn set_heading(&mut self, heading: &str)[src]

Sets the heading of the tree.

pub fn full_heading(&self) -> String[src]

Gets the full heading for the tree, including beginning asterisks.

pub fn content_as_ref(&self) -> &Vec<String>[src]

Returns a reference to the content of the tree.

pub fn content_as_mut(&mut self) -> &mut Vec<String>[src]

Returns a mutable reference to the content of the tree.

pub fn subtrees_as_ref(&self) -> &Vec<Org>[src]

Returns a reference to the subtrees of the tree.

pub fn subtrees_as_mut(&mut self) -> &mut Vec<Org>[src]

Returns a mutable reference to the subtrees of the tree.

Trait Implementations

impl PartialEq<Org> for Org[src]

impl<'a> PartialEq<&'a str> for Org[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<Org> for &'a str[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<String> for Org[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<Org> for String[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Default for Org[src]

impl Clone for Org[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Display for Org[src]

impl Debug for Org[src]

Auto Trait Implementations

impl Send for Org

impl Sync for Org

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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