struct Pairing<'a> {
open: Option<(&'a str, usize)>,
closed: BTreeMap<&'a str, Range<usize>>,
}Expand description
Pairs begin and end markers into regions.
Fields§
§open: Option<(&'a str, usize)>§closed: BTreeMap<&'a str, Range<usize>>Implementations§
Source§impl<'a> Pairing<'a>
impl<'a> Pairing<'a>
Sourcefn begin(
&mut self,
name: &'a str,
body_start: usize,
) -> Result<(), MarkdownError>
fn begin( &mut self, name: &'a str, body_start: usize, ) -> Result<(), MarkdownError>
Open a region whose body starts at body_start.
Sourcefn end(&mut self, name: &'a str, body_end: usize) -> Result<(), MarkdownError>
fn end(&mut self, name: &'a str, body_end: usize) -> Result<(), MarkdownError>
Close the open region, whose body ends at body_end.
fn into_regions(self) -> Result<BTreeMap<&'a str, Range<usize>>, MarkdownError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Pairing<'a>
impl<'a> RefUnwindSafe for Pairing<'a>
impl<'a> Send for Pairing<'a>
impl<'a> Sync for Pairing<'a>
impl<'a> Unpin for Pairing<'a>
impl<'a> UnsafeUnpin for Pairing<'a>
impl<'a> UnwindSafe for Pairing<'a>
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