pub struct TypeMapper<'a> { /* private fields */ }Expand description
Handles mapping of FHIR types to Rust types
Implementations§
Source§impl<'a> TypeMapper<'a>
impl<'a> TypeMapper<'a>
pub fn new( config: &'a CodegenConfig, value_set_manager: &'a mut ValueSetManager, ) -> Self
Sourcepub fn map_fhir_type(
&mut self,
fhir_types: &[ElementType],
is_array: bool,
) -> RustType
pub fn map_fhir_type( &mut self, fhir_types: &[ElementType], is_array: bool, ) -> RustType
Map a FHIR type to a Rust type
Sourcepub fn map_fhir_type_with_binding(
&mut self,
fhir_types: &[ElementType],
binding: Option<&ElementBinding>,
is_array: bool,
) -> RustType
pub fn map_fhir_type_with_binding( &mut self, fhir_types: &[ElementType], binding: Option<&ElementBinding>, is_array: bool, ) -> RustType
Map a FHIR type to a Rust type, considering binding information for enum generation
Sourcepub fn get_value_set_type(&mut self, value_set_url: &str) -> RustType
pub fn get_value_set_type(&mut self, value_set_url: &str) -> RustType
Get the appropriate Rust type for a ValueSet binding
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TypeMapper<'a>
impl<'a> RefUnwindSafe for TypeMapper<'a>
impl<'a> Send for TypeMapper<'a>
impl<'a> Sync for TypeMapper<'a>
impl<'a> Unpin for TypeMapper<'a>
impl<'a> UnsafeUnpin for TypeMapper<'a>
impl<'a> !UnwindSafe for TypeMapper<'a>
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