pub struct ObjectServiceClient<T> { /* private fields */ }Expand description
The public Anvil 0.5 network contract. Peer and storage-coordination services remain private. Ordinary object calls are independent. Only InvokeProgram requests atomic multi-path visibility; indexes are asynchronous derived views over the same visible object state.
Implementations§
Source§impl<T> ObjectServiceClient<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> ObjectServiceClient<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,
) -> ObjectServiceClient<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 start_put(
&mut self,
request: impl IntoRequest<PutHeader>,
) -> Result<Response<PutToken>, Status>
pub async fn start_put( &mut self, request: impl IntoRequest<PutHeader>, ) -> Result<Response<PutToken>, Status>
The complete put header is unary so an upload stream can contain only payload chunks. Its typed operation selects Put, PutIfAbsent, PutIfVersion, or PutImmutable. The returned opaque token binds the authenticated caller, complete header, selected operation, and expiry. This contract does not require StartPut to create durable object state or hold a path lock. An unavailable durability is rejected here, before the client uploads any bytes; it is never silently downgraded.
Sourcepub async fn put(
&mut self,
request: impl IntoStreamingRequest<Message = PutRequest>,
) -> Result<Response<PutToken>, Status>
pub async fn put( &mut self, request: impl IntoStreamingRequest<Message = PutRequest>, ) -> Result<Response<PutToken>, Status>
Every request in this client stream carries the UPLOAD-phase token returned by exactly one StartPut call. Closing the stream seals the staged bytes but does not publish an object. The returned READY-phase token is the only token PutEnd accepts. A zero-byte object is one request containing the token and an empty chunk; an empty request stream is invalid.
Sourcepub async fn put_end(
&mut self,
request: impl IntoRequest<PutToken>,
) -> Result<Response<MutationReceipt>, Status>
pub async fn put_end( &mut self, request: impl IntoRequest<PutToken>, ) -> Result<Response<MutationReceipt>, Status>
The sole publication point for a sealed streamed upload. An UPLOAD token cannot call PutEnd and a READY token cannot start Put. PutEnd revalidates caller identity, current authorization, operation policy and final CAS.
Sourcepub async fn delete(
&mut self,
request: impl IntoRequest<DeleteRequest>,
) -> Result<Response<MutationReceipt>, Status>
pub async fn delete( &mut self, request: impl IntoRequest<DeleteRequest>, ) -> Result<Response<MutationReceipt>, Status>
Publish the next tombstone version, including when the path never existed.
Sourcepub async fn delete_if_version(
&mut self,
request: impl IntoRequest<DeleteIfVersionRequest>,
) -> Result<Response<MutationReceipt>, Status>
pub async fn delete_if_version( &mut self, request: impl IntoRequest<DeleteIfVersionRequest>, ) -> Result<Response<MutationReceipt>, Status>
Publish the next tombstone only when the current live or tombstone head has exactly the supplied version.
Sourcepub async fn delete_version(
&mut self,
request: impl IntoRequest<DeleteVersionRequest>,
) -> Result<Response<DeleteVersionResponse>, Status>
pub async fn delete_version( &mut self, request: impl IntoRequest<DeleteVersionRequest>, ) -> Result<Response<DeleteVersionResponse>, Status>
Permanently removes one exact retained version from a version-enabled bucket. A missing version is an idempotent successful no-op. Removing a non-current version leaves the head unchanged. Removing the current live version publishes a fresh monotonic tombstone; older retained versions never become current again. The current tombstone is the path’s CAS/ABA fence and cannot be removed.
pub async fn head_object( &mut self, request: impl IntoRequest<HeadObjectRequest>, ) -> Result<Response<ObjectHead>, Status>
Sourcepub async fn list_objects(
&mut self,
request: impl IntoRequest<ListObjectsRequest>,
) -> Result<Response<ListObjectsResponse>, Status>
pub async fn list_objects( &mut self, request: impl IntoRequest<ListObjectsRequest>, ) -> Result<Response<ListObjectsResponse>, Status>
Returns one stateless page of current live paths in strict UTF-8 byte order. This is a read-committed view of one page, not a snapshot held across pages. Passing the last returned path as start_after resumes after it. The implementation scans the current-head keyspace directly; it does not require or maintain a side index.
pub async fn get_object( &mut self, request: impl IntoRequest<GetObjectRequest>, ) -> Result<Response<Streaming<ObjectChunk>>, Status>
Sourcepub async fn list_object_versions(
&mut self,
request: impl IntoRequest<ListObjectVersionsRequest>,
) -> Result<Response<Streaming<ObjectVersion>>, Status>
pub async fn list_object_versions( &mut self, request: impl IntoRequest<ListObjectVersionsRequest>, ) -> Result<Response<Streaming<ObjectVersion>>, Status>
Streams retained metadata for one exact path in ascending version order. Payload bytes are never included and the server pages storage internally. This is a bounded-memory read-committed stream, not a snapshot of the entire version history.
pub async fn bulk_write( &mut self, request: impl IntoRequest<BulkWriteRequest>, ) -> Result<Response<BulkWriteResponse>, Status>
pub async fn batch_get( &mut self, request: impl IntoRequest<BatchGetRequest>, ) -> Result<Response<BatchGetResponse>, Status>
pub async fn watch_prefix( &mut self, request: impl IntoRequest<WatchPrefixRequest>, ) -> Result<Response<Streaming<WatchMessage>>, Status>
pub async fn set_bucket_policy( &mut self, request: impl IntoRequest<SetBucketPolicyRequest>, ) -> Result<Response<BucketPolicy>, Status>
pub async fn invoke_program( &mut self, request: impl IntoRequest<InvokeProgramRequest>, ) -> Result<Response<InvokeProgramResponse>, Status>
Trait Implementations§
Source§impl<T: Clone> Clone for ObjectServiceClient<T>
impl<T: Clone> Clone for ObjectServiceClient<T>
Source§fn clone(&self) -> ObjectServiceClient<T>
fn clone(&self) -> ObjectServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for ObjectServiceClient<T>
impl<T> RefUnwindSafe for ObjectServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for ObjectServiceClient<T>where
T: Send,
impl<T> Sync for ObjectServiceClient<T>where
T: Sync,
impl<T> Unpin for ObjectServiceClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for ObjectServiceClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ObjectServiceClient<T>where
T: 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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request