pub struct FloraServiceClient<Stub = Channel<FloraServiceRequest, FloraServiceResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl FloraServiceClient
impl FloraServiceClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<FloraServiceRequest, FloraServiceResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<FloraServiceRequest, FloraServiceResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> FloraServiceClient<Stub>
impl<Stub> FloraServiceClient<Stub>
Sourcepub fn ping(
&self,
ctx: Context,
) -> impl Future<Output = Result<String, RpcError>> + '_
pub fn ping( &self, ctx: Context, ) -> impl Future<Output = Result<String, RpcError>> + '_
Pings the server. Can be used to check the server is alive.
A server is expected to respond with PONG.
Sourcepub fn add_record(
&self,
ctx: Context,
record_params: RecordParams,
) -> impl Future<Output = Result<OmryResult<RecordId>, RpcError>> + '_
pub fn add_record( &self, ctx: Context, record_params: RecordParams, ) -> impl Future<Output = Result<OmryResult<RecordId>, RpcError>> + '_
Adds a record to flora.
Sourcepub fn add_many_records(
&self,
ctx: Context,
records: Vec<RecordParams>,
) -> impl Future<Output = Result<OmryResult<RecordIds>, RpcError>> + '_
pub fn add_many_records( &self, ctx: Context, records: Vec<RecordParams>, ) -> impl Future<Output = Result<OmryResult<RecordIds>, RpcError>> + '_
Adds multiple records to flora.
Sourcepub fn count(
&self,
ctx: Context,
) -> impl Future<Output = Result<OmryResult<i64>, RpcError>> + '_
pub fn count( &self, ctx: Context, ) -> impl Future<Output = Result<OmryResult<i64>, RpcError>> + '_
Returns the count of records in the database.
Sourcepub fn get_records(
&self,
ctx: Context,
record_ids: RecordIds,
) -> impl Future<Output = Result<OmryResult<Arc<Vec<Record>>>, RpcError>> + '_
pub fn get_records( &self, ctx: Context, record_ids: RecordIds, ) -> impl Future<Output = Result<OmryResult<Arc<Vec<Record>>>, RpcError>> + '_
Gets records matching the given IDs.
Sourcepub fn get_all_records(
&self,
ctx: Context,
) -> impl Future<Output = Result<OmryResult<Arc<Vec<Record>>>, RpcError>> + '_
pub fn get_all_records( &self, ctx: Context, ) -> impl Future<Output = Result<OmryResult<Arc<Vec<Record>>>, RpcError>> + '_
Gets all records in the Omry database.
Sourcepub fn get_all_records_meta(
&self,
ctx: Context,
) -> impl Future<Output = Result<OmryResult<Vec<RecordMeta>>, RpcError>> + '_
pub fn get_all_records_meta( &self, ctx: Context, ) -> impl Future<Output = Result<OmryResult<Vec<RecordMeta>>, RpcError>> + '_
Gets the metadata (all fields except document)
for all records in the Omry database.
Sourcepub fn delete_record(
&self,
ctx: Context,
record_id: RecordId,
) -> impl Future<Output = Result<OmryResult<usize>, RpcError>> + '_
pub fn delete_record( &self, ctx: Context, record_id: RecordId, ) -> impl Future<Output = Result<OmryResult<usize>, RpcError>> + '_
Deletes record with the given ID.
Sourcepub fn search(
&self,
ctx: Context,
search_params: SearchParametersWrapper,
) -> impl Future<Output = Result<OmryResult<SearchResponse>, RpcError>> + '_
pub fn search( &self, ctx: Context, search_params: SearchParametersWrapper, ) -> impl Future<Output = Result<OmryResult<SearchResponse>, RpcError>> + '_
Searches Omry’s Typesense instance.
Trait Implementations§
Source§impl<Stub: Clone> Clone for FloraServiceClient<Stub>
impl<Stub: Clone> Clone for FloraServiceClient<Stub>
Source§fn clone(&self) -> FloraServiceClient<Stub>
fn clone(&self) -> FloraServiceClient<Stub>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Stub: Debug> Debug for FloraServiceClient<Stub>
impl<Stub: Debug> Debug for FloraServiceClient<Stub>
Source§impl<Stub> From<Stub> for FloraServiceClient<Stub>
impl<Stub> From<Stub> for FloraServiceClient<Stub>
Auto Trait Implementations§
impl<Stub> Freeze for FloraServiceClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for FloraServiceClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for FloraServiceClient<Stub>where
Stub: Send,
impl<Stub> Sync for FloraServiceClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for FloraServiceClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for FloraServiceClient<Stub>where
Stub: UnwindSafe,
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