pub struct Txn<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Txn<'a>
impl<'a> Txn<'a>
pub async fn query( &mut self, q: impl Into<String>, ) -> Result<Response, DgraphError>
pub async fn query_with_vars( &mut self, q: impl Into<String>, vars: HashMap<String, String>, ) -> Result<Response, DgraphError>
pub async fn mutate(&mut self, mu: Mutation) -> Result<Response, DgraphError>
pub async fn upsert( &mut self, q: impl Into<String>, mu: Mutation, ) -> Result<Response, DgraphError>
pub async fn commit(&mut self) -> Result<(), DgraphError>
pub async fn commit_or_abort(&mut self) -> Result<(), DgraphError>
pub async fn discard(&mut self) -> Result<(), DgraphError>
Auto Trait Implementations§
impl<'a> !Freeze for Txn<'a>
impl<'a> !RefUnwindSafe for Txn<'a>
impl<'a> Send for Txn<'a>
impl<'a> Sync for Txn<'a>
impl<'a> Unpin for Txn<'a>
impl<'a> !UnwindSafe for Txn<'a>
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