pub enum DefaultValue {
Missing,
Json(&'static str),
DurationNanos(u64),
}Expand description
The default value for a config key, as resolved at build time from the Agent schema.
Durations are normalized to nanoseconds during codegen (the build fails if a format: duration default isn’t a valid Go duration), so the runtime default check never has to parse a
schema default. Other keys keep their JSON-literal default and are compared structurally.
Variants§
Missing
The schema declares no default for this key.
Json(&'static str)
A JSON-encoded default value (for example, "\"tlsv1.2\"" or "1").
DurationNanos(u64)
A format: duration default, already parsed to nanoseconds. The Agent transmits durations
as integer nanoseconds, so the incoming value is normalized the same way before comparing.
Trait Implementations§
Source§impl Clone for DefaultValue
impl Clone for DefaultValue
Source§fn clone(&self) -> DefaultValue
fn clone(&self) -> DefaultValue
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 DefaultValue
Source§impl Debug for DefaultValue
impl Debug for DefaultValue
impl Eq for DefaultValue
Source§impl PartialEq for DefaultValue
impl PartialEq for DefaultValue
Source§fn eq(&self, other: &DefaultValue) -> bool
fn eq(&self, other: &DefaultValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DefaultValue
Auto Trait Implementations§
impl Freeze for DefaultValue
impl RefUnwindSafe for DefaultValue
impl Send for DefaultValue
impl Sync for DefaultValue
impl Unpin for DefaultValue
impl UnsafeUnpin for DefaultValue
impl UnwindSafe for DefaultValue
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