pub struct get_line;
Expand description
Gets a line of text from stdin
ⓘ
builtin! fn get_line () -> IResult<ConValue>
{
let mut line = String::new(); let _ =
std::io::stdin().read_line(&mut line); Ok(ConValue::String(line.into()))
}
Trait Implementations§
Source§impl Callable for get_line
impl Callable for get_line
Source§fn call(&self, env: &mut Environment, args: &[ConValue]) -> IResult<ConValue>
fn call(&self, env: &mut Environment, args: &[ConValue]) -> IResult<ConValue>
Calls this Callable in the provided Environment, with ConValue args
The Callable is responsible for checking the argument count and validating types
The Callable is responsible for checking the argument count and validating types
Auto Trait Implementations§
impl Freeze for get_line
impl RefUnwindSafe for get_line
impl Send for get_line
impl Sync for get_line
impl Unpin for get_line
impl UnwindSafe for get_line
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