[−][src]Struct org::org::Org
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]
fn eq(&self, other: &&str) -> bool
[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]
fn eq(&self, other: &Org) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<String> for Org
[src]
fn eq(&self, other: &String) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Org> for String
[src]
fn eq(&self, other: &Org) -> bool
[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(&self) -> 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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,