[−][src]Struct gameshell::PartialParse
A partial parse is a parse where we send single bytes into the parser and get back a complete parsing state. This is useful when reading TCP streams or other streams that may yield at any point in time.
This structure does not in any way do any interpreting or evaluate, it's just used for stream parsing. This structure is quite low-level. See the tests in this file to see how it operates, based on that, you need to add surrounding facilities where you use this struct to handle the outputs it gives you.
Methods
impl PartialParse
[src]
pub fn parse_increment(&mut self, input: u8) -> PartialParseOp
[src]
Parses. 1 byte at a time
This function assumes that a linear stream of bytes is fed into it.
It will return PartialParseOp::Discard
when there has been an error. In such cases, all previous bytes ought
to be discarded and not interpreted.
When it returns PartialParseOp::Ready
, it means that the previous bytes (except for those that were
marked PartialParseOp::Discard
) can be sent into interpret_single
safely.
When it returns PartialParseOp::Unready
, it means that the parser simply noticed the character and
advanced its internal state.
Trait Implementations
impl Debug for PartialParse
[src]
impl Default for PartialParse
[src]
fn default() -> PartialParse
[src]
impl PartialEq<PartialParse> for PartialParse
[src]
fn eq(&self, other: &PartialParse) -> bool
[src]
fn ne(&self, other: &PartialParse) -> bool
[src]
impl StructuralPartialEq for PartialParse
[src]
Auto Trait Implementations
impl RefUnwindSafe for PartialParse
impl Send for PartialParse
impl Sync for PartialParse
impl Unpin for PartialParse
impl UnwindSafe for PartialParse
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,