#[non_exhaustive]pub struct ObservabilityConfig {
pub emit_metrics: bool,
pub record_replay: bool,
pub trace_sample_per_mille: u16,
}Expand description
What the runtime records about itself (spec §26).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.emit_metrics: boolWhether Signals are emitted.
record_replay: boolWhether a ReplayRecord is
persisted for every turn (I20).
trace_sample_per_mille: u16Trace sampling, in per mille, so the configuration stays exactly comparable and hashable.
Implementations§
Source§impl ObservabilityConfig
impl ObservabilityConfig
Sourcepub const fn conservative() -> Self
pub const fn conservative() -> Self
Metrics on, replay on, every turn traced.
Sourcepub const fn with_trace_sample_per_mille(self, per_mille: u16) -> Self
pub const fn with_trace_sample_per_mille(self, per_mille: u16) -> Self
Returns a copy with another trace sample rate.
Trait Implementations§
Source§impl Clone for ObservabilityConfig
impl Clone for ObservabilityConfig
impl Copy for ObservabilityConfig
Source§impl Debug for ObservabilityConfig
impl Debug for ObservabilityConfig
Source§impl Default for ObservabilityConfig
impl Default for ObservabilityConfig
Source§impl<'de> Deserialize<'de> for ObservabilityConfig
impl<'de> Deserialize<'de> for ObservabilityConfig
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
impl Eq for ObservabilityConfig
Source§impl PartialEq for ObservabilityConfig
impl PartialEq for ObservabilityConfig
Source§impl Serialize for ObservabilityConfig
impl Serialize for ObservabilityConfig
impl StructuralPartialEq for ObservabilityConfig
Auto Trait Implementations§
impl Freeze for ObservabilityConfig
impl RefUnwindSafe for ObservabilityConfig
impl Send for ObservabilityConfig
impl Sync for ObservabilityConfig
impl Unpin for ObservabilityConfig
impl UnsafeUnpin for ObservabilityConfig
impl UnwindSafe for ObservabilityConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.