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§

source

type Client: Client

Client type.

Required Methods§

source

fn into_infallible(self) -> InfallibleClient<Self::Client>

Converts a value into an InfallibleClient.

Implementations on Foreign Types§

source§

impl<C> IntoInfallibleClient for Result<C, Error>
where C: Client,

Implementors§