Struct ress::JSBuffer [−][src]
Fields
buffer: &'a [u8]
idx: usize
len: usize
Implementations
Re-implementation of the std::str::Chars logic
Check if the next few bytes match the provided bytes
Check if the next byte matches a single byte provided
Skip the number of characters provided note: these are full unicode characters, not just bytes
Skip a single byte
note: this can cause the buffer to become unaligned
be sure to always know the character you are skipping
is 1 byte wide or use skip
instead when unsure
check if current char is a valid js whitespace character
Check of the look ahead character is a valid js new line character
check if the look ahead character is a number
between 0
and 9
, inclusive
check if the look ahead character is a number
between 0
and 7
, inclusive
check if the look ahead character is a number
between 0
and 9
or a
and f
or A
and F
, inclusive
Peek forward 1 char with out updating the
idx
to this new position.
note: this will still cost the same amount
of work as next_char
but cleans up the
book keeping for you
Skip backwards a number of bytes
note: this can cause the buffer to become unaligned
be sure to always know the character you are skipping
is [count] bytes wide or use skip
instead when unsure
the right width is skipped
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for JSBuffer<'a>
impl<'a> UnwindSafe for JSBuffer<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more