Skip to main content

S3

Struct S3 

Source
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

Source

pub fn new(channel: Channel) -> Self

Creates a client over an established channel.

Source

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.

Source

pub async fn connect() -> Result<Self, GestaltError>

Connects to the s3 host service described by the environment.

Source

pub async fn connect_named(name: &str) -> Result<Self, GestaltError>

Connects to the named s3 host-service binding.

Source

pub async fn head_object( &mut self, ref: Option<S3ObjectRef>, ) -> Result<HeadObjectResponse, GestaltError>

Calls gestalt.provider.v1.S3.HeadObject.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn delete_object( &mut self, ref: Option<S3ObjectRef>, ) -> Result<(), GestaltError>

Calls gestalt.provider.v1.S3.DeleteObject.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. 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