pub trait AllowUndocumentedResponses<T, E> {
// Required method
fn allow_undocumented(self) -> Result<UndocumentedResponse<T>, E>;
}Expand description
If you want to suffer handle undocumented responses you can use this extension trait on
client API return values to move Undocumented from Err to Ok variant.
Example:
ⓘ
match client
.api_create_my_address(1)
.await
.allow_undocumented()?
{
UndocumentedResponse::Documented(resp) => {
// Process expected response...
}
UndocumentedResponse::Undocumented(resp) => {
// Do something with the unexpected response...
}
}
}