pub enum ParsedReference<'a> {
Local {
id: &'a str,
},
Relative {
resource_type: &'a str,
id: &'a str,
version_id: Option<&'a str>,
},
Absolute {
url: &'a str,
resource_type: Option<&'a str>,
id: Option<&'a str>,
},
}Expand description
Parsed parts of a FHIR reference. Can be one of local reference, relative reference or absolute reference. The absolute reference is unchecked and can be anything, it is used as fallback.
Variants§
Local
Local reference, the resource is to be found in the contained field.
Relative
Relative reference, the resource is on the same FHIR server.
Fields
Absolute
Absolute reference, the resource can be anywhere, might not even be FHIR
server. Might not be a URL, but a URI like a urn:uuid:....
Implementations§
Source§impl<'a> ParsedReference<'a>
impl<'a> ParsedReference<'a>
Sourcepub const fn resource_type(&self) -> Option<&'a str>
pub const fn resource_type(&self) -> Option<&'a str>
Get the resource type that this reference points to as string reference.
Might not be present/visible in absolute URLs or local references. In
absolute URLs, it might also return garbage, as the URL might have
enough segments, but the segment was not an actual resource type. Take
care when parsing to ResourceType.
Trait Implementations§
Source§impl<'a> Clone for ParsedReference<'a>
impl<'a> Clone for ParsedReference<'a>
Source§fn clone(&self) -> ParsedReference<'a>
fn clone(&self) -> ParsedReference<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more