pub struct Readline<H: Helper>(/* private fields */);
Implementations§
Source§impl<H: Helper> Readline<H>
impl<H: Helper> Readline<H>
pub fn new(helper: H) -> Self
pub fn load_history(&mut self, path: &Path) -> Result<(), Box<dyn Error>>
pub fn save_history(&mut self, path: &Path) -> Result<(), Box<dyn Error>>
pub fn add_history_entry(&mut self, entry: &str) -> Result<(), Box<dyn Error>>
pub fn readline(&mut self, prompt: &str) -> ReadlineResult
Auto Trait Implementations§
impl<H> Freeze for Readline<H>where
H: Freeze,
impl<H> !RefUnwindSafe for Readline<H>
impl<H> Send for Readline<H>where
H: Send,
impl<H> Sync for Readline<H>where
H: Sync,
impl<H> Unpin for Readline<H>where
H: Unpin,
impl<H> !UnwindSafe for Readline<H>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more