pub struct RedDBClient {
pub addr: String,
/* private fields */
}Fields§
§addr: StringImplementations§
Source§impl RedDBClient
impl RedDBClient
pub async fn connect( addr: &str, token: Option<String>, ) -> Result<RedDBClient, Box<dyn Error>>
Sourcepub fn set_token(&mut self, token: String)
pub fn set_token(&mut self, token: String)
Update the auth token (e.g. after a successful login).
pub async fn health_status(&mut self) -> Result<HealthStatus, Box<dyn Error>>
pub async fn health(&mut self) -> Result<String, Box<dyn Error>>
pub async fn query_reply( &mut self, sql: &str, ) -> Result<QueryResponse, Box<dyn Error>>
pub async fn query_reply_with_params( &mut self, sql: &str, params: Vec<QueryValue>, ) -> Result<QueryResponse, Box<dyn Error>>
pub async fn query(&mut self, sql: &str) -> Result<String, Box<dyn Error>>
pub async fn collections(&mut self) -> Result<Vec<String>, Box<dyn Error>>
pub async fn scan( &mut self, collection: &str, limit: u64, ) -> Result<String, Box<dyn Error>>
pub async fn stats(&mut self) -> Result<String, Box<dyn Error>>
pub async fn create_row( &mut self, collection: &str, json: &str, ) -> Result<String, Box<dyn Error>>
pub async fn create_row_entity( &mut self, collection: &str, json: &str, ) -> Result<CreatedEntity, Box<dyn Error>>
pub async fn bulk_create_rows( &mut self, collection: &str, payload_json: Vec<String>, ) -> Result<BulkCreateStatus, Box<dyn Error>>
pub async fn explain(&mut self, sql: &str) -> Result<String, Box<dyn Error>>
pub async fn login( &mut self, username: &str, password: &str, ) -> Result<String, Box<dyn Error>>
pub async fn replication_status(&mut self) -> Result<String, Box<dyn Error>>
Sourcepub async fn topology(&mut self) -> Result<Vec<u8>, Box<dyn Error>>
pub async fn topology(&mut self) -> Result<Vec<u8>, Box<dyn Error>>
Fetch the canonical Topology payload (issue #167 / ADR 0008).
Returns the raw topology_bytes so the caller can hand them
straight to TopologyConsumer::consume_bytes. Engine-free —
this connector knows nothing about the wire schema beyond the
proto envelope.
pub async fn delete_entity( &mut self, collection: &str, id: u64, ) -> Result<OperationStatus, Box<dyn Error>>
Trait Implementations§
Source§impl Clone for RedDBClient
impl Clone for RedDBClient
Source§fn clone(&self) -> RedDBClient
fn clone(&self) -> RedDBClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for RedDBClient
impl !RefUnwindSafe for RedDBClient
impl Send for RedDBClient
impl Sync for RedDBClient
impl Unpin for RedDBClient
impl UnsafeUnpin for RedDBClient
impl !UnwindSafe for RedDBClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request