pub trait ReadEntity: DeserializeOwned + Select { }
Expand description

Supertrait for entities that can be retrieved from a Microsoft Dataverse environment

This should be implemented by data structures you want to use with the following functions in Client:

  • retrieve(...)
  • retrieve_multiple(...)

Examples

#[derive(Deserialize)]
struct Contact {
    contactid: Uuid,
    firstname: String,
    lastname: String,
}

impl ReadEntity for Contact {}

impl Select for Contact {
    fn get_columns() -> &'static [&'static str] {
        &["contactid", "firstname", "lastname"]
    }
}

Implementors