Trait ResourceWrite

Source
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§

Source

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.

Source

fn create( &mut self, client: &Client<Version>, ) -> impl Future<Output = Result<String, Error>> + Send

Create this resource on the server. Returns the resource ID.

Source

fn delete( self, client: &Client<Version>, ) -> impl Future<Output = Result<(), Error>> + Send

Delete this resource on the FHIR server.

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.

Implementors§