#[non_exhaustive]pub enum TelemetryError {
InitFailed(String),
AlreadyInitialized,
}Expand description
Initialization and shutdown failures.
Documented failure modes are part of the API contract; every variant lists the condition that produces it.
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.
InitFailed(String)
A configuration or construction step failed before (or after) the
subscriber could be installed. The payload carries the underlying
message — an invalid env-filter directive, an unbuildable OTLP
exporter, or a failed shutdown flush.
AlreadyInitialized
The global tracing subscriber is a once-per-process resource:
tracing::subscriber::set_global_default was already called by
this crate, another crate, or an earlier Telemetry::init. A
second bootstrap returns this error instead of panicking.
Trait Implementations§
Source§impl Clone for TelemetryError
impl Clone for TelemetryError
Source§impl Debug for TelemetryError
impl Debug for TelemetryError
Source§impl Display for TelemetryError
impl Display for TelemetryError
impl Eq for TelemetryError
Source§impl Error for TelemetryError
impl Error for TelemetryError
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 TelemetryError
impl PartialEq for TelemetryError
impl StructuralPartialEq for TelemetryError
Auto Trait Implementations§
impl Freeze for TelemetryError
impl RefUnwindSafe for TelemetryError
impl Send for TelemetryError
impl Sync for TelemetryError
impl Unpin for TelemetryError
impl UnsafeUnpin for TelemetryError
impl UnwindSafe for TelemetryError
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