pub struct ParseResult {
pub datagrams: Vec<SflowDatagram>,
pub error: Option<SflowError>,
}Expand description
Result of parsing one or more sFlow datagrams from a byte buffer.
Contains all successfully parsed datagrams and an optional error if parsing failed partway through. This allows partial results when a buffer contains multiple datagrams and one is malformed.
Fields§
§datagrams: Vec<SflowDatagram>Successfully parsed sFlow datagrams.
error: Option<SflowError>Error encountered during parsing, if any. When present,
datagrams may still contain successfully parsed entries
from before the error occurred.
Trait Implementations§
Source§impl Clone for ParseResult
impl Clone for ParseResult
Source§fn clone(&self) -> ParseResult
fn clone(&self) -> ParseResult
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 moreSource§impl Debug for ParseResult
impl Debug for ParseResult
Source§impl<'de> Deserialize<'de> for ParseResult
impl<'de> Deserialize<'de> for ParseResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ParseResult
impl PartialEq for ParseResult
Source§impl Serialize for ParseResult
impl Serialize for ParseResult
impl Eq for ParseResult
impl StructuralPartialEq for ParseResult
Auto Trait Implementations§
impl Freeze for ParseResult
impl RefUnwindSafe for ParseResult
impl Send for ParseResult
impl Sync for ParseResult
impl Unpin for ParseResult
impl UnsafeUnpin for ParseResult
impl UnwindSafe for ParseResult
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