ValidateWhitespace

Struct ValidateWhitespace 

Source
pub struct ValidateWhitespace<'r, 's> { /* private fields */ }
Expand description

Centralize validation for all whitespace-like content

Implementations§

Source§

impl<'r, 's> ValidateWhitespace<'r, 's>

Source

pub fn new(receiver: &'r mut dyn EventReceiver, source: Source<'s>) -> Self

Trait Implementations§

Source§

impl EventReceiver for ValidateWhitespace<'_, '_>

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, 's> Freeze for ValidateWhitespace<'r, 's>

§

impl<'r, 's> !RefUnwindSafe for ValidateWhitespace<'r, 's>

§

impl<'r, 's> !Send for ValidateWhitespace<'r, 's>

§

impl<'r, 's> !Sync for ValidateWhitespace<'r, 's>

§

impl<'r, 's> Unpin for ValidateWhitespace<'r, 's>

§

impl<'r, 's> !UnwindSafe for ValidateWhitespace<'r, 's>

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.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes