pub trait ORM {
// Required methods
fn json<T: DeserializeOwned>(&mut self) -> Result<T, RequestError>;
fn get_by_id(&mut self, id: &str) -> &mut SanityClient;
fn get_by_ids(&mut self, ids: &[&str]) -> &mut SanityClient;
fn send(&mut self) -> impl Future<Output = Result<&mut Self, RequestError>>;
}Expand description
A trait defining the interface for an Object-Relational Mapper (ORM). This trait provides methods for interacting with a data source, retrieving data in JSON format, and performing CRUD operations.
Required Methods§
Sourcefn json<T: DeserializeOwned>(&mut self) -> Result<T, RequestError>
fn json<T: DeserializeOwned>(&mut self) -> Result<T, RequestError>
Sourcefn get_by_id(&mut self, id: &str) -> &mut SanityClient
fn get_by_id(&mut self, id: &str) -> &mut SanityClient
Sourcefn get_by_ids(&mut self, ids: &[&str]) -> &mut SanityClient
fn get_by_ids(&mut self, ids: &[&str]) -> &mut SanityClient
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.