pub struct RecordApi { /* private fields */ }Implementations§
Source§impl RecordApi
impl RecordApi
pub async fn list<T: DeserializeOwned>( &self, args: ListArguments<'_>, ) -> Result<ListResponse<T>, Error>
pub async fn read<'a, T: DeserializeOwned>( &self, args: impl ReadArgumentsTrait<'a>, ) -> Result<T, Error>
pub async fn create<T: Serialize>(&self, record: T) -> Result<String, Error>
pub async fn create_bulk<T: Serialize>( &self, record: &[T], ) -> Result<Vec<String>, Error>
pub async fn update<'a, T: Serialize>( &self, id: impl RecordId<'a>, record: T, ) -> Result<(), Error>
pub async fn delete<'a>(&self, id: impl RecordId<'a>) -> Result<(), Error>
pub async fn subscribe<'a, T: RecordId<'a>>( &self, id: T, ) -> Result<impl Stream<Item = DbEvent> + use<T>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RecordApi
impl !RefUnwindSafe for RecordApi
impl Send for RecordApi
impl Sync for RecordApi
impl Unpin for RecordApi
impl !UnwindSafe for RecordApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more