pub trait ResourceWrite<Version>:
Serialize
+ Send
+ Sync {
// Required methods
fn update(
&mut self,
conditional: bool,
client: &Client<Version>,
) -> impl Future<Output = Result<bool, Error>> + Send;
fn create(
&mut self,
client: &Client<Version>,
) -> impl Future<Output = Result<String, Error>> + Send;
fn delete(
self,
client: &Client<Version>,
) -> impl Future<Output = Result<(), Error>> + Send;
}
Expand description
A trait to write resources to the FHIR server, mutating the interior id and version_id so that the resource is up to date for future update requests.
Required Methods§
Sourcefn update(
&mut self,
conditional: bool,
client: &Client<Version>,
) -> impl Future<Output = Result<bool, Error>> + Send
fn update( &mut self, conditional: bool, client: &Client<Version>, ) -> impl Future<Output = Result<bool, Error>> + Send
Update the current version of the resource on the server. Returns whether the resource was created.
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.