pub trait AnyResource<V: FhirVersion>: Send + Sync {
const TYPE: V::ResourceType;
const TYPE_STR: &'static str;
// Required methods
fn id(&self) -> Option<&str>;
fn set_id(&mut self, id: String);
fn version_id(&self) -> Option<&str>;
fn set_version_id(&mut self, version_id: String);
}Expand description
Basic trait to combine all resources from all FHIR versions to one. Especially for use in the client to accept and handly any resource. Only implemented if “builders” feature is active.
Required Associated Constants§
Sourceconst TYPE: V::ResourceType
const TYPE: V::ResourceType
ResourceType of this resource.
Required Methods§
Sourcefn version_id(&self) -> Option<&str>
fn version_id(&self) -> Option<&str>
Get the resource’s version ID as string.
Sourcefn set_version_id(&mut self, version_id: String)
fn set_version_id(&mut self, version_id: String)
Set the resource’s version ID.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.