pub struct S3 { /* private fields */ }Expand description
S3 models the shared Gestalt S3-provider protocol.
Client for the gestalt.provider.v1.S3 service.
Implementations§
Source§impl S3
impl S3
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Sets a deadline applied to every unary call; calls that run past it fail with DEADLINE_EXCEEDED. Streaming calls are unaffected.
Sourcepub async fn connect() -> Result<Self, GestaltError>
pub async fn connect() -> Result<Self, GestaltError>
Connects to the s3 host service described by the environment.
Sourcepub async fn connect_named(name: &str) -> Result<Self, GestaltError>
pub async fn connect_named(name: &str) -> Result<Self, GestaltError>
Connects to the named s3 host-service binding.
Sourcepub async fn head_object(
&mut self,
ref: Option<S3ObjectRef>,
) -> Result<HeadObjectResponse, GestaltError>
pub async fn head_object( &mut self, ref: Option<S3ObjectRef>, ) -> Result<HeadObjectResponse, GestaltError>
Calls gestalt.provider.v1.S3.HeadObject.
Sourcepub async fn head_object_raw(
&mut self,
request: HeadObjectRequest,
) -> Result<HeadObjectResponse, GestaltError>
pub async fn head_object_raw( &mut self, request: HeadObjectRequest, ) -> Result<HeadObjectResponse, GestaltError>
Calls gestalt.provider.v1.S3.HeadObject with the full request and response messages.
Sourcepub async fn read_object(
&mut self,
request: ReadObjectRequest,
) -> Result<(S3ObjectMeta, S3ReadObjectData), GestaltError>
pub async fn read_object( &mut self, request: ReadObjectRequest, ) -> Result<(S3ObjectMeta, S3ReadObjectData), GestaltError>
The first response frame carries object metadata. All subsequent frames carry byte chunks. Zero-byte objects therefore emit exactly one frame.
Calls gestalt.provider.v1.S3.ReadObject, returning the meta header and a payload stream.
Sourcepub async fn read_object_raw(
&mut self,
request: ReadObjectRequest,
) -> Result<S3ReadObjectStream, GestaltError>
pub async fn read_object_raw( &mut self, request: ReadObjectRequest, ) -> Result<S3ReadObjectStream, GestaltError>
The first response frame carries object metadata. All subsequent frames carry byte chunks. Zero-byte objects therefore emit exactly one frame.
Calls gestalt.provider.v1.S3.ReadObject, returning a stream of converted frames.
Sourcepub async fn write_object(
&mut self,
open: WriteObjectOpen,
data: impl Stream<Item = Vec<u8>> + Send + 'static,
) -> Result<WriteObjectResponse, GestaltError>
pub async fn write_object( &mut self, open: WriteObjectOpen, data: impl Stream<Item = Vec<u8>> + Send + 'static, ) -> Result<WriteObjectResponse, GestaltError>
The first request frame must carry WriteObjectOpen metadata. All subsequent frames carry raw bytes. The response is emitted only after the object has been durably committed by the provider.
Calls gestalt.provider.v1.S3.WriteObject, sending the open header frame and then one frame per data chunk.
Sourcepub async fn write_object_raw(
&mut self,
requests: impl Stream<Item = WriteObjectRequest> + Send + 'static,
) -> Result<WriteObjectResponse, GestaltError>
pub async fn write_object_raw( &mut self, requests: impl Stream<Item = WriteObjectRequest> + Send + 'static, ) -> Result<WriteObjectResponse, GestaltError>
The first request frame must carry WriteObjectOpen metadata. All subsequent frames carry raw bytes. The response is emitted only after the object has been durably committed by the provider.
Calls gestalt.provider.v1.S3.WriteObject with the full request and response messages.
Sourcepub async fn delete_object(
&mut self,
ref: Option<S3ObjectRef>,
) -> Result<(), GestaltError>
pub async fn delete_object( &mut self, ref: Option<S3ObjectRef>, ) -> Result<(), GestaltError>
Calls gestalt.provider.v1.S3.DeleteObject.
Sourcepub async fn delete_object_raw(
&mut self,
request: DeleteObjectRequest,
) -> Result<(), GestaltError>
pub async fn delete_object_raw( &mut self, request: DeleteObjectRequest, ) -> Result<(), GestaltError>
Calls gestalt.provider.v1.S3.DeleteObject with the full request and response messages.
Sourcepub async fn list_objects(
&mut self,
prefix: String,
delimiter: String,
continuation_token: String,
start_after: String,
max_keys: i32,
) -> Result<ListObjectsResponse, GestaltError>
pub async fn list_objects( &mut self, prefix: String, delimiter: String, continuation_token: String, start_after: String, max_keys: i32, ) -> Result<ListObjectsResponse, GestaltError>
Calls gestalt.provider.v1.S3.ListObjects.
Sourcepub async fn list_objects_raw(
&mut self,
request: ListObjectsRequest,
) -> Result<ListObjectsResponse, GestaltError>
pub async fn list_objects_raw( &mut self, request: ListObjectsRequest, ) -> Result<ListObjectsResponse, GestaltError>
Calls gestalt.provider.v1.S3.ListObjects with the full request and response messages.
Sourcepub async fn copy_object(
&mut self,
if_match: String,
if_none_match: String,
source: Option<S3ObjectRef>,
destination: Option<S3ObjectRef>,
) -> Result<CopyObjectResponse, GestaltError>
pub async fn copy_object( &mut self, if_match: String, if_none_match: String, source: Option<S3ObjectRef>, destination: Option<S3ObjectRef>, ) -> Result<CopyObjectResponse, GestaltError>
Calls gestalt.provider.v1.S3.CopyObject.
Sourcepub async fn copy_object_raw(
&mut self,
request: CopyObjectRequest,
) -> Result<CopyObjectResponse, GestaltError>
pub async fn copy_object_raw( &mut self, request: CopyObjectRequest, ) -> Result<CopyObjectResponse, GestaltError>
Calls gestalt.provider.v1.S3.CopyObject with the full request and response messages.
Sourcepub async fn presign_object(
&mut self,
method: PresignMethod,
expires_seconds: i64,
ref: Option<S3ObjectRef>,
options: S3PresignObjectOptions,
) -> Result<PresignObjectResponse, GestaltError>
pub async fn presign_object( &mut self, method: PresignMethod, expires_seconds: i64, ref: Option<S3ObjectRef>, options: S3PresignObjectOptions, ) -> Result<PresignObjectResponse, GestaltError>
Calls gestalt.provider.v1.S3.PresignObject.
Sourcepub async fn presign_object_raw(
&mut self,
request: PresignObjectRequest,
) -> Result<PresignObjectResponse, GestaltError>
pub async fn presign_object_raw( &mut self, request: PresignObjectRequest, ) -> Result<PresignObjectResponse, GestaltError>
Calls gestalt.provider.v1.S3.PresignObject with the full request and response messages.
Auto Trait Implementations§
impl !Freeze for S3
impl !RefUnwindSafe for S3
impl !UnwindSafe for S3
impl Send for S3
impl Sync for S3
impl Unpin for S3
impl UnsafeUnpin for S3
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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