pub struct Repl {
pub session: Session,
pub compact: bool,
pub errors: usize,
pub quit_requested: bool,
/* private fields */
}Expand description
the read-eval-print loop over a session: lines in, answers out
Fields§
§session: Sessionthe session the lines act on
compact: bool--compact: documents printed in the wire form, one line each
errors: usizehow many inputs were refused (error: lines): the exit status
quit_requested: bool:quit was given, or the input ended
Implementations§
Source§impl Repl
impl Repl
Sourcepub fn new(out: Box<dyn Fn(&str)>, entry: Option<&str>) -> Repl
pub fn new(out: Box<dyn Fn(&str)>, entry: Option<&str>) -> Repl
A REPL printing through out, over the universe of entry (none: a scratch session).
Sourcepub fn line(&mut self, text: &str) -> bool
pub fn line(&mut self, text: &str) -> bool
feed one line; returns true when the input is complete and was handled
Auto Trait Implementations§
impl !Freeze for Repl
impl !RefUnwindSafe for Repl
impl !Send for Repl
impl !Sync for Repl
impl !UnwindSafe for Repl
impl Unpin for Repl
impl UnsafeUnpin for Repl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more