pub enum StatsigError {
Show 13 variants
Api {
status: u16,
message: String,
},
Network(String),
Serialization(String),
Validation(String),
Configuration(String),
Cache(String),
BatchProcessor(String),
RateLimited {
retry_after_seconds: u64,
},
Unauthorized,
UserValidation(String),
GateNotFound(String),
ConfigNotFound(String),
Internal(String),
}Variants§
Api
Network(String)
Serialization(String)
Validation(String)
Configuration(String)
Cache(String)
BatchProcessor(String)
RateLimited
UserValidation(String)
GateNotFound(String)
ConfigNotFound(String)
Internal(String)
Implementations§
Source§impl StatsigError
impl StatsigError
pub fn api(status: u16, message: impl Into<String>) -> Self
pub fn validation(message: impl Into<String>) -> Self
pub fn configuration(message: impl Into<String>) -> Self
pub fn cache(message: impl Into<String>) -> Self
pub fn batch_processor(message: impl Into<String>) -> Self
pub fn rate_limited(retry_after_seconds: u64) -> Self
pub fn user_validation(message: impl Into<String>) -> Self
pub fn gate_not_found(name: impl Into<String>) -> Self
pub fn config_not_found(name: impl Into<String>) -> Self
pub fn internal(message: impl Into<String>) -> Self
pub fn network(message: impl Into<String>) -> Self
pub fn serialization(message: impl Into<String>) -> Self
Sourcepub fn with_context(self, context: &str) -> Self
pub fn with_context(self, context: &str) -> Self
Adds context to an error for better debugging and error reporting
Source§impl StatsigError
impl StatsigError
pub fn is_retryable(&self) -> bool
pub fn retry_after_seconds(&self) -> Option<u64>
Trait Implementations§
Source§impl Clone for StatsigError
impl Clone for StatsigError
Source§fn clone(&self) -> StatsigError
fn clone(&self) -> StatsigError
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatsigError
impl Debug for StatsigError
Source§impl Display for StatsigError
impl Display for StatsigError
Source§impl Error for StatsigError
impl Error for StatsigError
1.30.0§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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for StatsigError
impl From<Error> for StatsigError
Auto Trait Implementations§
impl Freeze for StatsigError
impl RefUnwindSafe for StatsigError
impl Send for StatsigError
impl Sync for StatsigError
impl Unpin for StatsigError
impl UnwindSafe for StatsigError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP