pub struct Prompt<'msg> { /* private fields */ }
Implementations§
Source§impl Prompt<'_>
impl Prompt<'_>
pub fn read<T: FromStr>(&mut self) -> Result<T, T::Err>
pub fn read_str(&mut self) -> &str
pub fn read_string(self) -> String
pub fn read_until_ok<A, Ef>(&mut self, handle_error: Ef) -> A
pub fn read_until_ok_with<T, E, F, Ef>( &mut self, action: F, handle_error: Ef, ) -> T
pub fn read_line<T: FromStr>(&mut self) -> Result<T, T::Err>
Source§impl Prompt<'_>
impl Prompt<'_>
pub fn new() -> Self
pub fn get<T: FromStr>(&mut self) -> Result<T, T::Err>
pub fn get_str(&mut self) -> &str
pub fn get_string(self) -> String
pub fn get_until_ok<A, Ef>(&mut self, handle_error: Ef) -> A
pub fn get_until_ok_with<T, E, F, Ef>( &mut self, action: F, handle_error: Ef, ) -> T
Trait Implementations§
Auto Trait Implementations§
impl<'msg> Freeze for Prompt<'msg>
impl<'msg> RefUnwindSafe for Prompt<'msg>
impl<'msg> Send for Prompt<'msg>
impl<'msg> Sync for Prompt<'msg>
impl<'msg> Unpin for Prompt<'msg>
impl<'msg> UnwindSafe for Prompt<'msg>
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