pub struct StringReader {
pub cursor: usize,
/* private fields */
}
Fields§
§cursor: usize
Implementations§
Source§impl StringReader
impl StringReader
pub fn string(&self) -> &str
pub fn remaining_length(&self) -> usize
pub fn total_length(&self) -> usize
pub fn get_read(&self) -> &str
pub fn remaining(&self) -> &str
pub fn can_read_length(&self, length: usize) -> bool
pub fn can_read(&self) -> bool
pub fn peek(&self) -> char
pub fn peek_offset(&self, offset: usize) -> char
pub fn cursor(&self) -> usize
pub fn read(&mut self) -> char
pub fn skip(&mut self)
pub fn is_allowed_number(c: char) -> bool
pub fn is_quoted_string_start(c: char) -> bool
pub fn skip_whitespace(&mut self)
pub fn read_int(&mut self) -> Result<i32, CommandSyntaxException>
pub fn read_long(&mut self) -> Result<i64, CommandSyntaxException>
pub fn read_double(&mut self) -> Result<f64, CommandSyntaxException>
pub fn read_float(&mut self) -> Result<f32, CommandSyntaxException>
pub fn is_allowed_in_unquoted_string(c: char) -> bool
pub fn read_unquoted_string(&mut self) -> &str
pub fn read_quoted_string(&mut self) -> Result<String, CommandSyntaxException>
pub fn read_string_until( &mut self, terminator: char, ) -> Result<String, CommandSyntaxException>
pub fn read_string(&mut self) -> Result<String, CommandSyntaxException>
pub fn read_boolean(&mut self) -> Result<bool, CommandSyntaxException>
pub fn expect(&mut self, c: char) -> Result<(), CommandSyntaxException>
Trait Implementations§
Source§impl Clone for StringReader
impl Clone for StringReader
Source§fn clone(&self) -> StringReader
fn clone(&self) -> StringReader
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl From<&str> for StringReader
impl From<&str> for StringReader
Auto Trait Implementations§
impl Freeze for StringReader
impl RefUnwindSafe for StringReader
impl Send for StringReader
impl Sync for StringReader
impl Unpin for StringReader
impl UnwindSafe for StringReader
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)