pub enum AuditValue {
String(String),
Bytes(Vec<u8>),
Number(i64),
Bool(bool),
Null,
}Expand description
Typed value variants accepted by the audit-field guard. The
serializer (to_json_line) owns the framing; an AuditValue
cannot smuggle structural bytes past the canonical encoder
(crate::serde_json::Value::escape_string, RFC 8259 §7) because
the variant is consumed as a typed value, not as an interpolated
string. Adversarial corpora (CRLF, NUL, quote, semicolon,
JSON-in-JSON, control bytes 0x00..0x20) survive the boundary
because the encoder emits \u00XX escapes for every byte below
0x20.
Variants§
String(String)
Bytes(Vec<u8>)
Arbitrary bytes — base64-encoded on emit so non-UTF-8 payloads (binary keys, raw frame bytes) never enter the JSON string channel.
Number(i64)
Bool(bool)
Null
Trait Implementations§
Source§impl Clone for AuditValue
impl Clone for AuditValue
Source§fn clone(&self) -> AuditValue
fn clone(&self) -> AuditValue
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 moreSource§impl Debug for AuditValue
impl Debug for AuditValue
Source§impl From<&[u8]> for AuditValue
impl From<&[u8]> for AuditValue
Source§impl From<&String> for AuditValue
impl From<&String> for AuditValue
Source§impl From<&str> for AuditValue
impl From<&str> for AuditValue
Source§impl<T: Into<AuditValue>> From<Option<T>> for AuditValue
impl<T: Into<AuditValue>> From<Option<T>> for AuditValue
Source§impl From<String> for AuditValue
impl From<String> for AuditValue
Source§impl From<bool> for AuditValue
impl From<bool> for AuditValue
Source§impl From<i64> for AuditValue
impl From<i64> for AuditValue
Source§impl From<u32> for AuditValue
impl From<u32> for AuditValue
Source§impl From<u64> for AuditValue
impl From<u64> for AuditValue
Auto Trait Implementations§
impl Freeze for AuditValue
impl RefUnwindSafe for AuditValue
impl Send for AuditValue
impl Sync for AuditValue
impl Unpin for AuditValue
impl UnsafeUnpin for AuditValue
impl UnwindSafe for AuditValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request