Struct googapis::google::datastore::v1beta3::datastore_client::DatastoreClient [−][src]
pub struct DatastoreClient<T> { /* fields omitted */ }
Expand description
Each RPC normalizes the partition IDs of the keys in its input entities, and always returns entities with keys with normalized partition IDs. This applies to all keys and entities, including those in values, except keys with both an empty path and an empty or unset partition ID. Normalization of input keys sets the project ID (if not already set) to the project ID from the request.
Implementations
impl<T> DatastoreClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> DatastoreClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> DatastoreClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn lookup(
&mut self,
request: impl IntoRequest<LookupRequest>
) -> Result<Response<LookupResponse>, Status>
pub async fn lookup(
&mut self,
request: impl IntoRequest<LookupRequest>
) -> Result<Response<LookupResponse>, Status>
Looks up entities by key.
pub async fn run_query(
&mut self,
request: impl IntoRequest<RunQueryRequest>
) -> Result<Response<RunQueryResponse>, Status>
pub async fn run_query(
&mut self,
request: impl IntoRequest<RunQueryRequest>
) -> Result<Response<RunQueryResponse>, Status>
Queries for entities.
pub async fn begin_transaction(
&mut self,
request: impl IntoRequest<BeginTransactionRequest>
) -> Result<Response<BeginTransactionResponse>, Status>
pub async fn begin_transaction(
&mut self,
request: impl IntoRequest<BeginTransactionRequest>
) -> Result<Response<BeginTransactionResponse>, Status>
Begins a new transaction.
pub 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>
Commits a transaction, optionally creating, deleting or modifying some entities.
pub async fn rollback(
&mut self,
request: impl IntoRequest<RollbackRequest>
) -> Result<Response<RollbackResponse>, Status>
pub async fn rollback(
&mut self,
request: impl IntoRequest<RollbackRequest>
) -> Result<Response<RollbackResponse>, Status>
Rolls back a transaction.
pub async fn allocate_ids(
&mut self,
request: impl IntoRequest<AllocateIdsRequest>
) -> Result<Response<AllocateIdsResponse>, Status>
pub async fn allocate_ids(
&mut self,
request: impl IntoRequest<AllocateIdsRequest>
) -> Result<Response<AllocateIdsResponse>, Status>
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
pub async fn reserve_ids(
&mut self,
request: impl IntoRequest<ReserveIdsRequest>
) -> Result<Response<ReserveIdsResponse>, Status>
pub async fn reserve_ids(
&mut self,
request: impl IntoRequest<ReserveIdsRequest>
) -> Result<Response<ReserveIdsResponse>, Status>
Prevents the supplied keys’ IDs from being auto-allocated by Cloud Datastore.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for DatastoreClient<T> where
T: RefUnwindSafe,
impl<T> Send for DatastoreClient<T> where
T: Send,
impl<T> Sync for DatastoreClient<T> where
T: Sync,
impl<T> Unpin for DatastoreClient<T> where
T: Unpin,
impl<T> UnwindSafe for DatastoreClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more