pub trait ObjectService:
Send
+ Sync
+ 'static {
type GetObjectStream: Stream<Item = Result<ObjectChunk, Status>> + Send + 'static;
type ListObjectVersionsStream: Stream<Item = Result<ObjectVersion, Status>> + Send + 'static;
type WatchPrefixStream: Stream<Item = Result<WatchMessage, Status>> + Send + 'static;
Show 15 methods
// Required methods
fn start_put<'life0, 'async_trait>(
&'life0 self,
request: Request<PutHeader>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutToken>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<PutRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutToken>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put_end<'life0, 'async_trait>(
&'life0 self,
request: Request<PutToken>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_if_version<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteIfVersionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_version<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteVersionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteVersionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn head_object<'life0, 'async_trait>(
&'life0 self,
request: Request<HeadObjectRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ObjectHead>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_objects<'life0, 'async_trait>(
&'life0 self,
request: Request<ListObjectsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListObjectsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_object<'life0, 'async_trait>(
&'life0 self,
request: Request<GetObjectRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetObjectStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_object_versions<'life0, 'async_trait>(
&'life0 self,
request: Request<ListObjectVersionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListObjectVersionsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn bulk_write<'life0, 'async_trait>(
&'life0 self,
request: Request<BulkWriteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BulkWriteResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn batch_get<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchGetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_prefix<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchPrefixRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchPrefixStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_bucket_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<SetBucketPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BucketPolicy>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn invoke_program<'life0, 'async_trait>(
&'life0 self,
request: Request<InvokeProgramRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<InvokeProgramResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with ObjectServiceServer.
Required Associated Types§
Sourcetype GetObjectStream: Stream<Item = Result<ObjectChunk, Status>> + Send + 'static
type GetObjectStream: Stream<Item = Result<ObjectChunk, Status>> + Send + 'static
Server streaming response type for the GetObject method.
Sourcetype ListObjectVersionsStream: Stream<Item = Result<ObjectVersion, Status>> + Send + 'static
type ListObjectVersionsStream: Stream<Item = Result<ObjectVersion, Status>> + Send + 'static
Server streaming response type for the ListObjectVersions method.
Sourcetype WatchPrefixStream: Stream<Item = Result<WatchMessage, Status>> + Send + 'static
type WatchPrefixStream: Stream<Item = Result<WatchMessage, Status>> + Send + 'static
Server streaming response type for the WatchPrefix method.
Required Methods§
Sourcefn start_put<'life0, 'async_trait>(
&'life0 self,
request: Request<PutHeader>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_put<'life0, 'async_trait>(
&'life0 self,
request: Request<PutHeader>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Sourcefn put<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<PutRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<PutRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Sourcefn put_end<'life0, 'async_trait>(
&'life0 self,
request: Request<PutToken>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_end<'life0, 'async_trait>(
&'life0 self,
request: Request<PutToken>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Sourcefn delete<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Publish the next tombstone version, including when the path never existed.
Sourcefn delete_if_version<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteIfVersionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_if_version<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteIfVersionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MutationReceipt>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Publish the next tombstone only when the current live or tombstone head has exactly the supplied version.
Sourcefn delete_version<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteVersionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteVersionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_version<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteVersionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteVersionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
fn head_object<'life0, 'async_trait>(
&'life0 self,
request: Request<HeadObjectRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ObjectHead>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list_objects<'life0, 'async_trait>(
&'life0 self,
request: Request<ListObjectsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListObjectsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_objects<'life0, 'async_trait>(
&'life0 self,
request: Request<ListObjectsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListObjectsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
fn get_object<'life0, 'async_trait>(
&'life0 self,
request: Request<GetObjectRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetObjectStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list_object_versions<'life0, 'async_trait>(
&'life0 self,
request: Request<ListObjectVersionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListObjectVersionsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_object_versions<'life0, 'async_trait>(
&'life0 self,
request: Request<ListObjectVersionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListObjectVersionsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
fn bulk_write<'life0, 'async_trait>(
&'life0 self,
request: Request<BulkWriteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BulkWriteResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn batch_get<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchGetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_prefix<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchPrefixRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchPrefixStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_bucket_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<SetBucketPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BucketPolicy>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke_program<'life0, 'async_trait>(
&'life0 self,
request: Request<InvokeProgramRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<InvokeProgramResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".