Trait xray_lite::IntoInfallibleClient
source · pub trait IntoInfallibleClient {
type Client: Client;
// Required method
fn into_infallible(self) -> InfallibleClient<Self::Client>;
}
Expand description
Conversion into an InfallibleClient
.
This is useful if you want to fall back to a “no-op” client if the creation of a client fails.
use xray_lite::{
Context as _,
CustomNamespace,
DaemonClient,
IntoInfallibleClient as _,
SubsegmentContext,
};
let client = DaemonClient::from_lambda_env().into_infallible();
let context = SubsegmentContext::from_lambda_env(client).unwrap();
let _session = context.enter_subsegment(CustomNamespace::new("readme.example"));
Required Associated Types§
Required Methods§
sourcefn into_infallible(self) -> InfallibleClient<Self::Client>
fn into_infallible(self) -> InfallibleClient<Self::Client>
Converts a value into an InfallibleClient
.