fhirpathrs 0.1.1

Fhirpath implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::ResourceNode;

pub enum Target {
    AnyAtRoot,
    Expr,
}

pub fn get_input_for_target<'a, 'b>(input: &'a ResourceNode<'a, 'b>, target: Target) -> ResourceNode<'a, 'b> {
    match target {
        Target::AnyAtRoot => ResourceNode::from_node(input, input.data_root.clone()),
        _ => input.clone(),
    }
}