pub enum ConstantValue {
}Expand description
Neutral SoF constant value covering every value[X] primitive family
the SoF v2 spec allows for ViewDefinition.constant[].
Stringly typed for the date/time/decimal families so engines can preserve
the lexical form (decimal precision; pre-prefixed @/@T literals).
Variants§
String(String)
valueString.
Code(String)
valueCode — bound as text in FHIRPath/SQL.
Identifier(String)
valueId, valueUri, valueUrl, valueOid, valueUuid,
valueCanonical — all bind as text.
Base64Binary(String)
valueBase64Binary.
Markdown(String)
valueMarkdown (currently only surfaced from the JSON path; no typed
variant exists in any FHIR version’s ViewDefinitionConstantValue yet).
Boolean(bool)
valueBoolean.
Integer(i64)
valueInteger.
PositiveInt(i64)
valuePositiveInt (FHIR 1..*) — surfaces as Integer in FHIRPath.
UnsignedInt(i64)
valueUnsignedInt (FHIR 0..*) — surfaces as Integer in FHIRPath.
Integer64(i64)
valueInteger64 (R5+). Surfaces as Integer64 in FHIRPath.
Decimal(String)
valueDecimal — kept as its lexical form so precision survives the
trip through FHIRPath / SQL parameter binding.
Date(String)
valueDate.
DateTime(String)
valueDateTime — may or may not be @-prefixed; normalised in
Self::to_evaluation_result.
Time(String)
valueTime — may or may not be @T-prefixed; normalised in
Self::to_evaluation_result.
Instant(String)
valueInstant — surfaces as EvaluationResult::DateTime tagged with
FHIR instant.
Implementations§
Source§impl ConstantValue
impl ConstantValue
Sourcepub fn to_evaluation_result(&self) -> Result<EvaluationResult, SofError>
pub fn to_evaluation_result(&self) -> Result<EvaluationResult, SofError>
Renders this constant as an EvaluationResult for the in-process
FHIRPath evaluator. Handles @ / @T literal prefixing and decimal
precision parsing. Returns Err only when a Self::Decimal lexical
form fails to parse.
Trait Implementations§
Source§impl Clone for ConstantValue
impl Clone for ConstantValue
Source§fn clone(&self) -> ConstantValue
fn clone(&self) -> ConstantValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConstantValue
impl Debug for ConstantValue
Source§impl PartialEq for ConstantValue
impl PartialEq for ConstantValue
Source§fn eq(&self, other: &ConstantValue) -> bool
fn eq(&self, other: &ConstantValue) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ConstantValue
Auto Trait Implementations§
impl Freeze for ConstantValue
impl RefUnwindSafe for ConstantValue
impl Send for ConstantValue
impl Sync for ConstantValue
impl Unpin for ConstantValue
impl UnsafeUnpin for ConstantValue
impl UnwindSafe for ConstantValue
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more