pub struct Input { /* private fields */ }Expand description
Input is a helper struct for parsing input. It is used by the generators to parse the input string. It ignores different kinds of whitespace.
Implementations§
Source§impl Input
impl Input
Sourcepub fn get_int(&mut self) -> Result<i32>
pub fn get_int(&mut self) -> Result<i32>
This function returns the next integer in the input. If there is no next integer, it returns an error.
Sourcepub fn get_float(&mut self) -> Result<f32>
pub fn get_float(&mut self) -> Result<f32>
This function returns the next float in the input. If there is no next float, it returns an error.
Sourcepub fn get_string(&mut self) -> Result<String>
pub fn get_string(&mut self) -> Result<String>
This function returns the next string in the input. If there is no next string, it returns an error.
Sourcepub fn expect_end(&mut self) -> Result<()>
pub fn expect_end(&mut self) -> Result<()>
This function expects the end of the input. If the input didn’t end yet it returns an error.
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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