pub struct ClientBuilder { /* private fields */ }Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn with_error_callback<F>(self, callback: F) -> Self
pub fn with_error_callback<F>(self, callback: F) -> Self
Set a callback function that will be called whenever an error occurs. This is useful for logging, monitoring, or custom error handling.
§Example
let client = Client::builder()
.with_error_callback(|error| {
eprintln!("Flag error occurred: {}", error);
// Send to monitoring service, etc.
})
.build();pub fn with_base_url(self, base_url: &str) -> Self
pub fn with_max_retries(self, max_retries: u32) -> Self
pub fn with_auth(self, auth: Auth) -> Self
pub fn with_file_name(self, file_name: &str) -> Self
pub fn with_memory_cache(self) -> Self
pub fn build(self) -> Result<Client, FlagError>
Auto Trait Implementations§
impl !RefUnwindSafe for ClientBuilder
impl !UnwindSafe for ClientBuilder
impl Freeze for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
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