pub enum SflowError {
Incomplete {
available: usize,
expected: Option<usize>,
context: ParseContext,
},
UnsupportedVersion {
version: u32,
},
ParseError {
offset: usize,
context: ParseContext,
kind: ParseErrorKind,
},
TooManySamples {
count: u32,
max: u32,
},
}Expand description
Errors that can occur when parsing sFlow datagrams.
Variants§
Incomplete
The input buffer is too short to read the expected field.
Fields
§
context: ParseContextThe parsing phase where the error occurred.
UnsupportedVersion
The datagram version is not sFlow v5.
ParseError
A structural parse error at a known offset.
Fields
§
context: ParseContextThe parsing phase where the error occurred.
§
kind: ParseErrorKindThe category of parse error.
TooManySamples
The datagram contains more samples than the configured limit.
Trait Implementations§
Source§impl Clone for SflowError
impl Clone for SflowError
Source§fn clone(&self) -> SflowError
fn clone(&self) -> SflowError
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 SflowError
impl Debug for SflowError
Source§impl<'de> Deserialize<'de> for SflowError
impl<'de> Deserialize<'de> for SflowError
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 Display for SflowError
impl Display for SflowError
Source§impl Error for SflowError
impl Error for SflowError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for SflowError
impl PartialEq for SflowError
Source§impl Serialize for SflowError
impl Serialize for SflowError
impl Eq for SflowError
impl StructuralPartialEq for SflowError
Auto Trait Implementations§
impl Freeze for SflowError
impl RefUnwindSafe for SflowError
impl Send for SflowError
impl Sync for SflowError
impl Unpin for SflowError
impl UnsafeUnpin for SflowError
impl UnwindSafe for SflowError
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