pub struct Arena { /* private fields */ }Implementations§
Source§impl Arena
impl Arena
pub fn parse_reader<T: Read>(&mut self, reader: &mut T) -> Result<Document>
pub fn parse_string(&mut self, input: String) -> Document
pub fn parse_str(&mut self, input: &str) -> Document
pub fn parse_rope(&mut self, input: Rope) -> Document
pub fn parse(&mut self, input: &RopeSlice<'_>) -> Document
Sourcepub fn new_section(&mut self, input: Rope) -> Option<Section>
pub fn new_section(&mut self, input: Rope) -> Option<Section>
Parse the provided input as a single section – a headline if possible, if not, a root document. The text must have at most one root headline – that is, “* A\n** B” is OK, but “* A\n* B” is not.
Unlike the other parsing sections that return a Document, we make no particular effort to ensure that (parse * write) is idempotent – i.e., we may not write out exactly what you put in in terms of newline, whitespace, etc.
Sourcepub fn clone_section(&mut self, section: Section) -> Section
pub fn clone_section(&mut self, section: Section) -> Section
Creates a new section (Org headline) with the same content as that specified. The new section will not have any children.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Arena
impl RefUnwindSafe for Arena
impl Send for Arena
impl Sync for Arena
impl Unpin for Arena
impl UnwindSafe for Arena
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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