Struct RecursionGuard

Source
pub struct RecursionGuard<'r> { /* private fields */ }

Implementations§

Source§

impl<'r> RecursionGuard<'r>

Source

pub fn new(receiver: &'r mut dyn EventReceiver, max_depth: u32) -> Self

Trait Implementations§

Source§

impl EventReceiver for RecursionGuard<'_>

Source§

fn std_table_open(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn std_table_close(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn array_table_open(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn array_table_close(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn inline_table_open(&mut self, span: Span, error: &mut dyn ErrorSink) -> bool

Returns if entering the inline table is allowed
Source§

fn inline_table_close(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn array_open(&mut self, span: Span, error: &mut dyn ErrorSink) -> bool

Returns if entering the array is allowed
Source§

fn array_close(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn simple_key( &mut self, span: Span, encoding: Option<Encoding>, error: &mut dyn ErrorSink, )

Source§

fn key_sep(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn key_val_sep(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn scalar( &mut self, span: Span, encoding: Option<Encoding>, error: &mut dyn ErrorSink, )

Source§

fn value_sep(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn whitespace(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn comment(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn newline(&mut self, span: Span, error: &mut dyn ErrorSink)

Source§

fn error(&mut self, span: Span, error: &mut dyn ErrorSink)

Auto Trait Implementations§

§

impl<'r> Freeze for RecursionGuard<'r>

§

impl<'r> !RefUnwindSafe for RecursionGuard<'r>

§

impl<'r> !Send for RecursionGuard<'r>

§

impl<'r> !Sync for RecursionGuard<'r>

§

impl<'r> Unpin for RecursionGuard<'r>

§

impl<'r> !UnwindSafe for RecursionGuard<'r>

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> 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, 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.