pub enum StreamParseResult {
Complete {
messages: Vec<ParsedMessage>,
bytes_consumed: usize,
},
Transform {
child_protocol: &'static str,
child_data: Vec<u8>,
bytes_consumed: usize,
metadata: Option<ParsedMessage>,
},
NeedMore {
minimum_bytes: Option<usize>,
},
NotThisProtocol,
Error {
message: String,
skip_bytes: Option<usize>,
},
}Expand description
Result of stream parsing.
Variants§
Complete
Successfully parsed one or more messages.
Transform
Parser produced a transformed stream for child parsing (e.g., TLS decryption).
Fields
§
metadata: Option<ParsedMessage>NeedMore
Need more data before parsing can proceed.
NotThisProtocol
This stream doesn’t match our protocol.
Error
Parse error - stream is malformed.
Trait Implementations§
Source§impl Clone for StreamParseResult
impl Clone for StreamParseResult
Source§fn clone(&self) -> StreamParseResult
fn clone(&self) -> StreamParseResult
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for StreamParseResult
impl RefUnwindSafe for StreamParseResult
impl Send for StreamParseResult
impl Sync for StreamParseResult
impl Unpin for StreamParseResult
impl UnwindSafe for StreamParseResult
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