#[non_exhaustive]pub enum TraceContextError {
Length(usize),
UnsupportedVersion,
Malformed,
ZeroTraceId,
ZeroSpanId,
}Expand description
Why Krabka rejected a client-supplied W3C trace context.
No variant holds the input that failed. An attacker controls a rejected
traceparent, and a message that keeps it verbatim would put that string
into the log field that shows the error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Length(usize)
The traceparent is not exactly 55 bytes long.
UnsupportedVersion
Krabka reads only version 00 of the W3C traceparent format.
Malformed
A separator was missing or a field held a non-lower-hex byte.
ZeroTraceId
The W3C specification defines an all-zero trace-id as invalid.
ZeroSpanId
The W3C specification defines an all-zero parent span-id as invalid.
Trait Implementations§
Source§impl Clone for TraceContextError
impl Clone for TraceContextError
Source§fn clone(&self) -> TraceContextError
fn clone(&self) -> TraceContextError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TraceContextError
Source§impl Debug for TraceContextError
impl Debug for TraceContextError
Source§impl Display for TraceContextError
impl Display for TraceContextError
impl Eq for TraceContextError
Source§impl Error for TraceContextError
impl Error for TraceContextError
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 TraceContextError
impl PartialEq for TraceContextError
Source§fn eq(&self, other: &TraceContextError) -> bool
fn eq(&self, other: &TraceContextError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TraceContextError
Auto Trait Implementations§
impl Freeze for TraceContextError
impl RefUnwindSafe for TraceContextError
impl Send for TraceContextError
impl Sync for TraceContextError
impl Unpin for TraceContextError
impl UnsafeUnpin for TraceContextError
impl UnwindSafe for TraceContextError
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