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

Multiple bytes making up a token. Only set for TokenType::String and TokenType::Number.

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]

Formats the value using the given formatter.

impl PartialEq for Buffer
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Buffer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more