Struct QuoteClassifiedBlock

Source
pub struct QuoteClassifiedBlock<B, M, const N: usize> {
    pub block: B,
    pub within_quotes_mask: M,
}
Expand description

Input block with a bitmask signifying which characters are within quotes.

Characters within quotes in the input are guaranteed to have their corresponding bit in within_quotes_mask set. The $0$-th bit of the mask corresponds to the last character in block, the $1$-st bit to the second-to-last character, etc.

There is no guarantee on how the boundary quote characters are classified, their bits might be lit or not lit depending on the implementation.

Fields§

§block: B

The block that was classified.

§within_quotes_mask: M

Mask marking characters within a quoted sequence.

Implementations§

Source§

impl<'i, B, M, const N: usize> QuoteClassifiedBlock<B, M, N>
where B: InputBlock<'i, N>,

Source

pub fn len(&self) -> usize

Returns the length of the classified block.

Source

pub fn is_empty(&self) -> bool

Whether the classified block is empty.

Auto Trait Implementations§

§

impl<B, M, const N: usize> Freeze for QuoteClassifiedBlock<B, M, N>
where B: Freeze, M: Freeze,

§

impl<B, M, const N: usize> RefUnwindSafe for QuoteClassifiedBlock<B, M, N>

§

impl<B, M, const N: usize> Send for QuoteClassifiedBlock<B, M, N>
where B: Send, M: Send,

§

impl<B, M, const N: usize> Sync for QuoteClassifiedBlock<B, M, N>
where B: Sync, M: Sync,

§

impl<B, M, const N: usize> Unpin for QuoteClassifiedBlock<B, M, N>
where B: Unpin, M: Unpin,

§

impl<B, M, const N: usize> UnwindSafe for QuoteClassifiedBlock<B, M, N>
where B: UnwindSafe, M: UnwindSafe,

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.