Skip to main content

ObjectServiceClient

Struct ObjectServiceClient 

Source
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 ObjectServiceClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<Self, Error>
where D: TryInto<Endpoint>, D::Error: Into<StdError>,

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

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,

Source

pub fn new(inner: T) -> Self

Source

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

Source

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,

Source

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.

Source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

Source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

Source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn head_object( &mut self, request: impl IntoRequest<HeadObjectRequest>, ) -> Result<Response<ObjectHead>, Status>

Source

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.

Source

pub async fn get_object( &mut self, request: impl IntoRequest<GetObjectRequest>, ) -> Result<Response<Streaming<ObjectChunk>>, Status>

Source

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.

Source

pub async fn bulk_write( &mut self, request: impl IntoRequest<BulkWriteRequest>, ) -> Result<Response<BulkWriteResponse>, Status>

Source

pub async fn batch_get( &mut self, request: impl IntoRequest<BatchGetRequest>, ) -> Result<Response<BatchGetResponse>, Status>

Source

pub async fn watch_prefix( &mut self, request: impl IntoRequest<WatchPrefixRequest>, ) -> Result<Response<Streaming<WatchMessage>>, Status>

Source

pub async fn set_bucket_policy( &mut self, request: impl IntoRequest<SetBucketPolicyRequest>, ) -> Result<Response<BucketPolicy>, Status>

Source

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>

Source§

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

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for ObjectServiceClient<T>

Source§

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

Formats the value using the given formatter. Read more

Auto 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> 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<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
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<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