Enum kailua_env::source::SourceSlice [] [src]

pub enum SourceSlice<'a> {
    U8(&'a [u8]),
    U16(&'a [u16]),
}

A byte or two-byte word slice.

Variants

A byte slice.

The encoding is not specified as per Lua (which has no notion of encodings whatsoever). Kailua does try to calculate the Unicode-aware column number if the line is a valid UTF-8. Otherwise it is considered a legacy encoding, which column number mostly agrees to the byte offset.

A two-byte word slice. There is a good chance that this is a valid UTF-16.

Methods

impl<'a> SourceSlice<'a>
[src]

Trait Implementations

impl<'a> Clone for SourceSlice<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for SourceSlice<'a>
[src]

Formats the value using the given formatter.