pub type SzResult<T> = Result<T, SzError>;Expand description
Result type alias for Senzing SDK operations
This is the standard Result type used throughout the Senzing Rust SDK.
All Senzing operations return SzResult<T> instead of Result<T, SzError>.
§Examples
use sz_rust_sdk::error::SzResult;
fn senzing_operation() -> SzResult<String> {
// Your Senzing operation here
Ok("Success".to_string())
}Aliased Type§
pub enum SzResult<T> {
Ok(T),
Err(SzError),
}Variants§
Trait Implementations§
Source§impl<T> SzResultExt<T> for SzResult<T>
impl<T> SzResultExt<T> for SzResult<T>
Source§fn or_retry<F>(self, f: F) -> SzResult<T>
fn or_retry<F>(self, f: F) -> SzResult<T>
If the error is retryable, call the provided closure; otherwise propagate the error. Read more
Source§fn map_retryable<F>(self, f: F) -> SzResult<T>
fn map_retryable<F>(self, f: F) -> SzResult<T>
Maps retryable errors using the provided function, propagates non-retryable errors. Read more
Source§fn is_retryable_error(&self) -> bool
fn is_retryable_error(&self) -> bool
Returns true if the result is an error and that error is retryable
Source§fn is_unrecoverable_error(&self) -> bool
fn is_unrecoverable_error(&self) -> bool
Returns true if the result is an error and that error is unrecoverable
Source§fn is_bad_input_error(&self) -> bool
fn is_bad_input_error(&self) -> bool
Returns true if the result is an error and that error is bad input