Skip to main content

DatabaseClient

Struct DatabaseClient 

Source
pub struct DatabaseClient<T> { /* private fields */ }

Implementations§

Source§

impl DatabaseClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<DatabaseClient<Channel>, Error>
where D: TryInto<Endpoint>, <D as TryInto<Endpoint>>::Error: Into<Box<dyn Error + Sync + Send>>,

Attempt to create a new client by connecting to a given endpoint.

Source§

impl<T> DatabaseClient<T>

Source

pub fn new(inner: T) -> DatabaseClient<T>

Source

pub fn with_origin(inner: T, origin: Uri) -> DatabaseClient<T>

Source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> DatabaseClient<InterceptedService<T, F>>

Source

pub fn send_compressed(self, encoding: CompressionEncoding) -> DatabaseClient<T>

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

Source

pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> DatabaseClient<T>

Enable decompressing responses.

Source

pub fn max_decoding_message_size(self, limit: usize) -> DatabaseClient<T>

Limits the maximum size of a decoded message.

Default: 4MB

Source

pub fn max_encoding_message_size(self, limit: usize) -> DatabaseClient<T>

Limits the maximum size of an encoded message.

Default: usize::MAX

Source

pub async fn create_collection( &mut self, request: impl IntoRequest<CreateCollectionRequest>, ) -> Result<Response<StatusResponse>, Status>

Collection Management

Source

pub async fn delete_collection( &mut self, request: impl IntoRequest<DeleteCollectionRequest>, ) -> Result<Response<StatusResponse>, Status>

Source

pub async fn list_collections( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<ListCollectionsResponse>, Status>

Source

pub async fn get_collection_stats( &mut self, request: impl IntoRequest<CollectionStatsRequest>, ) -> Result<Response<CollectionStatsResponse>, Status>

Source

pub async fn insert( &mut self, request: impl IntoRequest<InsertRequest>, ) -> Result<Response<InsertResponse>, Status>

Insert vectors

Source

pub async fn batch_insert( &mut self, request: impl IntoRequest<BatchInsertRequest>, ) -> Result<Response<InsertResponse>, Status>

Source

pub async fn insert_text( &mut self, request: impl IntoRequest<InsertTextRequest>, ) -> Result<Response<InsertResponse>, Status>

Source

pub async fn vectorize( &mut self, request: impl IntoRequest<VectorizeRequest>, ) -> Result<Response<VectorizeResponse>, Status>

Source

pub async fn search_text( &mut self, request: impl IntoRequest<SearchTextRequest>, ) -> Result<Response<SearchResponse>, Status>

Source

pub async fn delete( &mut self, request: impl IntoRequest<DeleteRequest>, ) -> Result<Response<DeleteResponse>, Status>

Delete vectors

Source

pub async fn search( &mut self, request: impl IntoRequest<SearchRequest>, ) -> Result<Response<SearchResponse>, Status>

Search (ANN)

Source

pub async fn search_batch( &mut self, request: impl IntoRequest<BatchSearchRequest>, ) -> Result<Response<BatchSearchResponse>, Status>

Batch Search (ANN)

Source

pub async fn search_multi_collection( &mut self, request: impl IntoRequest<SearchMultiCollectionRequest>, ) -> Result<Response<SearchMultiCollectionResponse>, Status>

Multi-Geometry Search (v3.0)

Source

pub async fn get_node( &mut self, request: impl IntoRequest<GetNodeRequest>, ) -> Result<Response<GraphNode>, Status>

Graph Traversal API (v2.3)

Source

pub async fn get_neighbors( &mut self, request: impl IntoRequest<GetNeighborsRequest>, ) -> Result<Response<GetNeighborsResponse>, Status>

Source

pub async fn get_concept_parents( &mut self, request: impl IntoRequest<GetConceptParentsRequest>, ) -> Result<Response<GetConceptParentsResponse>, Status>

Source

pub async fn traverse( &mut self, request: impl IntoRequest<TraverseRequest>, ) -> Result<Response<TraverseResponse>, Status>

Source

pub async fn find_semantic_clusters( &mut self, request: impl IntoRequest<FindSemanticClustersRequest>, ) -> Result<Response<FindSemanticClustersResponse>, Status>

Source

pub async fn monitor( &mut self, request: impl IntoRequest<MonitorRequest>, ) -> Result<Response<Streaming<SystemStats>>, Status>

Stream statistics for TUI (Global or Collection tailored)

Source

pub async fn trigger_snapshot( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<StatusResponse>, Status>

Admin Controls

Source

pub async fn trigger_vacuum( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<StatusResponse>, Status>

Source

pub async fn trigger_reconsolidation( &mut self, request: impl IntoRequest<ReconsolidationRequest>, ) -> Result<Response<StatusResponse>, Status>

Source

pub async fn configure( &mut self, request: impl IntoRequest<ConfigUpdate>, ) -> Result<Response<StatusResponse>, Status>

Dynamic Configuration

Source

pub async fn replicate( &mut self, request: impl IntoRequest<ReplicationRequest>, ) -> Result<Response<Streaming<ReplicationLog>>, Status>

Replication (Leader -> Follower)

Source

pub async fn subscribe_to_events( &mut self, request: impl IntoRequest<EventSubscriptionRequest>, ) -> Result<Response<Streaming<EventMessage>>, Status>

CDC/Event Stream (External subscribers)

Source

pub async fn get_digest( &mut self, request: impl IntoRequest<DigestRequest>, ) -> Result<Response<DigestResponse>, Status>

Source

pub async fn rebuild_index( &mut self, request: impl IntoRequest<RebuildIndexRequest>, ) -> Result<Response<StatusResponse>, Status>

Source

pub async fn sync_handshake( &mut self, request: impl IntoRequest<SyncHandshakeRequest>, ) -> Result<Response<SyncHandshakeResponse>, Status>

Delta Sync (Merkle Tree — Task 2.1) Step 1: Client sends its digest, server returns which buckets differ.

Source

pub async fn sync_pull( &mut self, request: impl IntoRequest<SyncPullRequest>, ) -> Result<Response<Streaming<SyncVectorData>>, Status>

Step 2: Client requests vectors from specific buckets, server streams them.

Source

pub async fn sync_push( &mut self, request: impl IntoStreamingRequest<Message = SyncVectorData>, ) -> Result<Response<SyncPushResponse>, Status>

Step 3 (optional): Client pushes its unique vectors to the server.

Trait Implementations§

Source§

impl<T> Clone for DatabaseClient<T>
where T: Clone,

Source§

fn clone(&self) -> DatabaseClient<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for DatabaseClient<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for DatabaseClient<T>

§

impl<T> RefUnwindSafe for DatabaseClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for DatabaseClient<T>
where T: Send,

§

impl<T> Sync for DatabaseClient<T>
where T: Sync,

§

impl<T> Unpin for DatabaseClient<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for DatabaseClient<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for DatabaseClient<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more