Struct ketos::buffer::CodeBuffer [] [src]

pub struct CodeBuffer { /* fields omitted */ }

Buffers potentially incomplete input code

Methods

impl CodeBuffer
[src]

Creates a CodeBuffer with an empty buffer

Clears the input buffer.

Feeds some input to the buffer.

Input should be terminated with a newline ('\n').

Compilation will be attempted with the given interpreter. If parsing fails because more input is required, Ok(MoreResult::More(_)) will be returned, indicating the reason input is incomplete.

If some other error is encountered, it is returned. Otherwise, Ok(MoreResult::Complete(_)) is returned with compiled expressions.

If either Ok(MoreResult::Complete(_)) or Err(_) is returned, the input buffer is cleared after compiling.

Feeds some input to the buffer.

Like feed_compile, but the input is only parsed.

Trait Implementations

impl Clone for CodeBuffer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for CodeBuffer
[src]

Formats the value using the given formatter.