Struct StrReader

Source
pub struct StrReader<'a> {
    pub slice: &'a [u8],
    /* private fields */
}

Fields§

§slice: &'a [u8]

Trait Implementations§

Source§

impl<'a> From<&'a [u8]> for StrReader<'a>

Source§

fn from(value: &'a [u8]) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for StrReader<'a>

Source§

fn from(value: &'a str) -> Self

Converts to this type from the input type.
Source§

impl<'r> Reader<()> for StrReader<'r>

Source§

fn eof(&self) -> bool

Source§

fn col(&self) -> u32

Source§

fn line(&self) -> u32

Source§

fn offset(&self) -> usize

Source§

fn peek_two_chars(&self) -> &[u8]

Source§

fn peek_chars(&self) -> &[u8]

Source§

fn peek_byte_at(&self, offset: usize) -> Option<u8>

Source§

fn skip_space_tab(&mut self) -> usize

Source§

fn skip_space_and_tab_detect(&mut self, has_tab: &mut bool) -> usize

Source§

fn consume_bytes(&mut self, amount: usize) -> usize

Source§

fn try_read_slice_exact(&mut self, needle: &str) -> bool

Source§

fn get_read_line(&self) -> (usize, usize, usize)

Source§

fn read_line(&mut self) -> (usize, usize)

Source§

fn count_spaces(&self) -> u32

Source§

fn count_whitespace_from(&self, offset: usize) -> usize

Source§

fn count_spaces_till(&self, num_spaces: u32) -> usize

Source§

fn is_empty_newline(&self) -> bool

Source§

fn get_double_quote(&self) -> Option<usize>

Source§

fn get_double_quote_trim(&self, start_str: usize) -> Option<(usize, usize)>

Source§

fn get_single_quote(&self) -> Option<usize>

Source§

fn get_single_quote_trim(&self, start_str: usize) -> Option<(usize, usize)>

Source§

fn read_plain_one_line( &mut self, offset_start: Option<usize>, had_comment: &mut bool, in_flow_collection: bool, ) -> (usize, usize, usize)

Source§

fn count_space_then_tab(&mut self) -> (u32, u32)

Source§

fn consume_anchor_alias(&mut self) -> (usize, usize)

Source§

fn read_tag(&mut self) -> (Option<ErrorType>, usize, usize, usize)

Source§

fn read_tag_handle(&mut self) -> Result<Vec<u8>, ErrorType>

Source§

fn read_tag_uri(&mut self) -> Option<(usize, usize)>

Source§

fn read_break(&mut self) -> Option<(usize, usize)>

Source§

fn peek_byte(&self) -> Option<u8>

Source§

fn peek_byte_is(&self, needle: u8) -> bool

Source§

fn peek_byte_is_off(&self, needle: u8, offset: usize) -> bool

Source§

fn peek_stream_ending(&self) -> bool

Source§

fn count_whitespace(&self) -> usize

Auto Trait Implementations§

§

impl<'a> Freeze for StrReader<'a>

§

impl<'a> RefUnwindSafe for StrReader<'a>

§

impl<'a> Send for StrReader<'a>

§

impl<'a> Sync for StrReader<'a>

§

impl<'a> Unpin for StrReader<'a>

§

impl<'a> UnwindSafe for StrReader<'a>

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.