pub struct UpstreamError { /* private fields */ }Expand description
A non-success answer from the terminology server, with what it said.
Implementations§
Source§impl UpstreamError
impl UpstreamError
Sourcepub fn new(version: WireVersion, status: StatusCode, body: String) -> Self
pub fn new(version: WireVersion, status: StatusCode, body: String) -> Self
Returns the upstream answer status and body describe, read in
version.
A failed operation answers “an OperationOutcome resource with error
details” (https://hl7.org/fhir/R4/operations.html), so the body is
decoded as one; a body that is not one is a legal answer from a server
that failed before the operation ran, and the raw body stays either
way.
Sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Returns the HTTP status the server answered with.
Sourcepub fn outcome(&self) -> Option<&Outcome>
pub fn outcome(&self) -> Option<&Outcome>
Returns the decoded OperationOutcome, when the body was one.
Sourcepub fn tx_issues(&self) -> impl Iterator<Item = &TxIssue>
pub fn tx_issues(&self) -> impl Iterator<Item = &TxIssue>
Returns every TX_ISSUE_TYPE coding the answer carries.
Sourcepub fn has_tx_issue(&self, code: &str) -> bool
pub fn has_tx_issue(&self, code: &str) -> bool
Returns whether any issue carries the TX_ISSUE_TYPE code code.
Trait Implementations§
Source§impl Clone for UpstreamError
impl Clone for UpstreamError
Source§impl Debug for UpstreamError
impl Debug for UpstreamError
Auto Trait Implementations§
impl Freeze for UpstreamError
impl RefUnwindSafe for UpstreamError
impl Send for UpstreamError
impl Sync for UpstreamError
impl Unpin for UpstreamError
impl UnsafeUnpin for UpstreamError
impl UnwindSafe for UpstreamError
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