pub trait IsStreaming {
// Required methods
fn incomplete<E, F>(needed: Needed, err_f: F) -> Err<E>
where F: FnOnce() -> E;
fn is_streaming() -> bool;
}
Expand description
Specifies the behaviour when a parser encounters an error that could be due to partial ata
Required Methods§
Sourcefn incomplete<E, F>(needed: Needed, err_f: F) -> Err<E>where
F: FnOnce() -> E,
fn incomplete<E, F>(needed: Needed, err_f: F) -> Err<E>where
F: FnOnce() -> E,
called by parsers on partial data errors
needed
can hold the amount of additional data the parser would need to decideerr_f
: produces the error when in “complete” mode
Sourcefn is_streaming() -> bool
fn is_streaming() -> bool
Indicates whether the data is in streaming mode or not
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.