Enum json_tools::Buffer
[−]
[src]
pub enum Buffer {
MultiByte(Vec<u8>),
Span(Span),
}Representation of a buffer containing items making up a Token.
It's either always Span, or one of the *Byte variants.
Variants
MultiByte(Vec<u8>)Multiple bytes making up a token. Only set for TokenType::String and
TokenType::Number.
Span(Span)The span allows to reference back into the source byte stream
to obtain the string making up the token.
Please note that for control characters, booleans and null (i.e
anything that is not Buffer::MultiByte you should use
<TokenType as AsRef<str>>::as_ref())
Trait Implementations
impl Debug for Buffer[src]
impl PartialEq for Buffer[src]
fn eq(&self, __arg_0: &Buffer) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Buffer) -> bool
This method tests for !=.
impl Clone for Buffer[src]
fn clone(&self) -> Buffer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more