pub struct DocumentServiceClient<T> { /* private fields */ }Expand description
Service for document CRUD and transaction management.
Implementations§
Source§impl<T> DocumentServiceClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> DocumentServiceClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DocumentServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn put_document(
&mut self,
request: impl IntoRequest<PutDocumentRequest>,
) -> Result<Response<PutDocumentResponse>, Status>
pub async fn put_document( &mut self, request: impl IntoRequest<PutDocumentRequest>, ) -> Result<Response<PutDocumentResponse>, Status>
Insert or replace a document (upsert by external ID).
Sourcepub async fn add_document(
&mut self,
request: impl IntoRequest<AddDocumentRequest>,
) -> Result<Response<AddDocumentResponse>, Status>
pub async fn add_document( &mut self, request: impl IntoRequest<AddDocumentRequest>, ) -> Result<Response<AddDocumentResponse>, Status>
Add a document as a new chunk (multiple chunks can share an ID).
Sourcepub async fn get_documents(
&mut self,
request: impl IntoRequest<GetDocumentsRequest>,
) -> Result<Response<GetDocumentsResponse>, Status>
pub async fn get_documents( &mut self, request: impl IntoRequest<GetDocumentsRequest>, ) -> Result<Response<GetDocumentsResponse>, Status>
Get all documents (including chunks) by external ID.
Sourcepub async fn delete_documents(
&mut self,
request: impl IntoRequest<DeleteDocumentsRequest>,
) -> Result<Response<DeleteDocumentsResponse>, Status>
pub async fn delete_documents( &mut self, request: impl IntoRequest<DeleteDocumentsRequest>, ) -> Result<Response<DeleteDocumentsResponse>, Status>
Delete all documents (including chunks) by external ID.
Sourcepub async fn commit(
&mut self,
request: impl IntoRequest<CommitRequest>,
) -> Result<Response<CommitResponse>, Status>
pub async fn commit( &mut self, request: impl IntoRequest<CommitRequest>, ) -> Result<Response<CommitResponse>, Status>
Commit pending changes to persistent storage.
Trait Implementations§
Source§impl<T: Clone> Clone for DocumentServiceClient<T>
impl<T: Clone> Clone for DocumentServiceClient<T>
Source§fn clone(&self) -> DocumentServiceClient<T>
fn clone(&self) -> DocumentServiceClient<T>
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 moreAuto Trait Implementations§
impl<T> !Freeze for DocumentServiceClient<T>
impl<T> RefUnwindSafe for DocumentServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for DocumentServiceClient<T>where
T: Send,
impl<T> Sync for DocumentServiceClient<T>where
T: Sync,
impl<T> Unpin for DocumentServiceClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for DocumentServiceClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DocumentServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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::RequestSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.