Skip to main content

ParseContext

Struct ParseContext 

Source
pub struct ParseContext<'i> {
Show 15 fields pub recursion_depth: usize, pub trim_depth: usize, pub inside_header: bool, pub inside_bold: bool, pub inside_italic: bool, pub inside_strikethrough: bool, pub inside_subscript: bool, pub inside_superscript: bool, pub inside_underline: bool, pub inside_footnote: bool, pub inside_media_element: bool, pub original_input: &'i [u8], pub max_recursion_depth: usize, pub section_counter: usize, pub footnote_counter: usize,
}

Fields§

§recursion_depth: usize§trim_depth: usize§inside_header: bool§inside_bold: bool§inside_italic: bool§inside_strikethrough: bool§inside_subscript: bool§inside_superscript: bool§inside_underline: bool§inside_footnote: bool§inside_media_element: bool§original_input: &'i [u8]§max_recursion_depth: usize§section_counter: usize§footnote_counter: usize

Implementations§

Source§

impl<'i> ParseContext<'i>

Source

pub fn new(input: &'i str) -> Self

새 컨텍스트 생성

Source

pub fn is_at_line_start(&self, position: usize) -> bool

현재 위치가 라인 시작인지 확인

Source

pub fn increase_depth(&mut self) -> Result<(), SevenMarkError>

재귀 깊이 증가 (in-place)

Source

pub fn decrease_depth(&mut self)

재귀 깊이 감소 (in-place)

Source

pub fn is_at_max_depth(&self) -> bool

최대 재귀 깊이에 도달했는지 확인

Source

pub fn current_depth(&self) -> usize

현재 재귀 깊이 반환

Source

pub fn remaining_depth(&self) -> usize

남은 재귀 깊이 반환

Source

pub fn next_section_index(&mut self) -> usize

다음 섹션 인덱스 반환 및 카운터 증가

Source

pub fn next_footnote_index(&mut self) -> usize

다음 각주 인덱스 반환 및 카운터 증가

Source

pub fn increase_trim_depth(&mut self)

trim_depth 증가

Source

pub fn decrease_trim_depth(&mut self)

trim_depth 감소

Source

pub fn is_trimming(&self) -> bool

trim 컨텍스트 안에 있는지 확인

Source

pub fn set_header_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_header_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Source

pub fn set_bold_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_bold_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Source

pub fn set_italic_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_italic_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Source

pub fn set_strikethrough_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_strikethrough_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Source

pub fn set_subscript_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_subscript_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Source

pub fn set_superscript_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_superscript_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Source

pub fn set_underline_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_underline_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Source

pub fn set_footnote_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_footnote_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Source

pub fn set_media_element_context(&mut self)

[<$name:upper>] 컨텍스트로 전환

Source

pub fn unset_media_element_context(&mut self)

[<$name:upper>] 컨텍스트 해제

Trait Implementations§

Source§

impl<'i> Clone for ParseContext<'i>

Source§

fn clone(&self) -> ParseContext<'i>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'i> Debug for ParseContext<'i>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'i> Freeze for ParseContext<'i>

§

impl<'i> RefUnwindSafe for ParseContext<'i>

§

impl<'i> Send for ParseContext<'i>

§

impl<'i> Sync for ParseContext<'i>

§

impl<'i> Unpin for ParseContext<'i>

§

impl<'i> UnwindSafe for ParseContext<'i>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.