Skip to main content

try_build_client

Function try_build_client 

Source
pub fn try_build_client<F>(configure: F) -> Result<Client, Error>
Expand description

Try to build an HTTP client, returning an error if both primary and fallback builders fail.

This is the fallible version of build_client. Use this when you want to handle the error gracefully (e.g., return an error to the caller) instead of panicking.