pub struct Dgraph { /* private fields */ }
Implementations§
Source§impl Dgraph
impl Dgraph
Sourcepub fn new(clients: Vec<DgraphClient>) -> Dgraph
pub fn new(clients: Vec<DgraphClient>) -> Dgraph
Creates a new Dgraph for interacting with the Dgraph store connected to in conns. The client can be backed by multiple connections (to the same server, or multiple servers in a cluster).
A single client is thread safe for sharing with multiple go routines.
pub fn login( &mut self, userid: String, password: String, ) -> Result<(), DgraphError>
pub fn alter(&self, op: &Operation) -> Result<Payload, DgraphError>
pub fn any_client(&self) -> Option<&DgraphClient>
pub fn new_txn(&self) -> Txn<'_>
pub fn new_readonly_txn(&self) -> Txn<'_>
pub fn is_jwt_expired(&self, grpc_error: &Error) -> bool
pub fn retry_login(&self) -> Result<(), DgraphError>
Auto Trait Implementations§
impl !Freeze for Dgraph
impl !RefUnwindSafe for Dgraph
impl Send for Dgraph
impl Sync for Dgraph
impl Unpin for Dgraph
impl !UnwindSafe for Dgraph
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