pub enum TypeSpecifier {
QualifiedIdentifier(String, Option<String>),
}Expand description
Represents a type specifier in FHIRPath
This enum is used to represent types in type operations like ‘is’ and ‘as’. It supports both simple types and namespace-qualified types as defined in the FHIRPath specification.
Type specifiers are used in expressions like:
value is Integerpatient is FHIR.Patientvalue as System.Decimal
The parser determines whether an identifier is a simple type name or a namespace-qualified type name based on the presence of a dot separator.
Variants§
QualifiedIdentifier(String, Option<String>)
A qualified identifier representing a type, possibly with a namespace
The first String is either:
- The namespace (when
Option<String>is Some), or - The type name (when
Option<String>is None)
The Option<String> is:
- Some(type_name) when a namespace is provided, or
- None when it’s a simple type without a namespace
Examples:
- FHIR.Patient -> QualifiedIdentifier(“FHIR”, Some(“Patient”))
- Boolean -> QualifiedIdentifier(“Boolean”, None)
- System.Boolean -> QualifiedIdentifier(“System”, Some(“Boolean”))
Trait Implementations§
Source§impl Clone for TypeSpecifier
impl Clone for TypeSpecifier
Source§fn clone(&self) -> TypeSpecifier
fn clone(&self) -> TypeSpecifier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeSpecifier
impl Debug for TypeSpecifier
Source§impl PartialEq for TypeSpecifier
impl PartialEq for TypeSpecifier
Source§fn eq(&self, other: &TypeSpecifier) -> bool
fn eq(&self, other: &TypeSpecifier) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TypeSpecifier
Auto Trait Implementations§
impl Freeze for TypeSpecifier
impl RefUnwindSafe for TypeSpecifier
impl Send for TypeSpecifier
impl Sync for TypeSpecifier
impl Unpin for TypeSpecifier
impl UnsafeUnpin for TypeSpecifier
impl UnwindSafe for TypeSpecifier
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