pub struct ApiResponseHandler;Expand description
Handles API responses with consistent error mapping and parsing
Implementations§
Source§impl ApiResponseHandler
impl ApiResponseHandler
Sourcepub async fn handle<T: DeserializeOwned>(response: Response) -> Result<T>
pub async fn handle<T: DeserializeOwned>(response: Response) -> Result<T>
Handles a generic API response
Sourcepub async fn handle_gate_response(
response: Response,
) -> Result<Vec<GateEvaluationResult>>
pub async fn handle_gate_response( response: Response, ) -> Result<Vec<GateEvaluationResult>>
Handles gate-specific API responses with custom parsing
Sourcepub async fn handle_config_response(
response: Response,
) -> Result<ConfigEvaluationResult>
pub async fn handle_config_response( response: Response, ) -> Result<ConfigEvaluationResult>
Handles config-specific API responses
Auto Trait Implementations§
impl Freeze for ApiResponseHandler
impl RefUnwindSafe for ApiResponseHandler
impl Send for ApiResponseHandler
impl Sync for ApiResponseHandler
impl Unpin for ApiResponseHandler
impl UnwindSafe for ApiResponseHandler
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