Skip to main content

LocalAsyncUploadServiceClient

Struct LocalAsyncUploadServiceClient 

Source
pub struct LocalAsyncUploadServiceClient<C> { /* private fields */ }

Trait Implementations§

Source§

impl<C> AsyncService<C> for LocalAsyncUploadServiceClient<C>

Source§

fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self

Creates a new service wrapping an async HTTP client.
Source§

impl<C: Clone> Clone for LocalAsyncUploadServiceClient<C>

Source§

fn clone(&self) -> LocalAsyncUploadServiceClient<C>

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<C: Debug> Debug for LocalAsyncUploadServiceClient<C>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<O, I: Stream<Item = Result<Bytes, Error>>, __C> LocalAsyncUploadService<O, I> for LocalAsyncUploadServiceClient<__C>
where __C: LocalAsyncClient<BodyWriter = O, ResponseBody = I>,

Source§

async fn initiate_multipart_upload( &self, auth_: &BearerToken, upload_request: &InitiateMultipartUploadRequest, ) -> Result<InitiateMultipartUploadResponse, Error>

Initiates a multipart upload to object storage. Returns an uploadId that should be used with listParts, signPart, and completeMultipartUpload.
Source§

async fn list_parts( &self, auth_: &BearerToken, upload_id: &str, key: &str, ) -> Result<Vec<PartWithSize>, Error>

Lists the parts that have been uploaded for a given uploadId.
Source§

async fn sign_part( &self, auth_: &BearerToken, upload_id: &str, key: &str, part_number: i32, ) -> Result<SignPartResponse, Error>

Signs an upload request for a single part. Returns a URL that will execute the upload without further authentication.
Source§

async fn complete_multipart_upload( &self, auth_: &BearerToken, upload_id: &str, key: &str, parts: &[Part], ) -> Result<CompleteMultipartUploadResponse, Error>

Completes a multipart upload to object storage. This should be called after all parts have been uploaded. Will throw EmptyMultipartUpload if there are 0 parts.
Source§

async fn abort_multipart_upload( &self, auth_: &BearerToken, upload_id: &str, key: &str, ) -> Result<(), Error>

Aborts a multipart upload to S3. Frees storage used by previously uploaded parts and prevents further uploads to the same uploadId.
Source§

async fn sign_download( &self, auth_: &BearerToken, request: &SignDownloadRequest, ) -> Result<SignDownloadResponse, Error>

Returns a short-lived signed GET URL for an object already in the uploads bucket. Use this to hand a freshly-uploaded object’s path to an external service (e.g. Dagger) without giving that service any Scout credentials. The caller must be authorized to read the workspace that owns the path (encoded as the first segment of the object key).
Source§

async fn upload_file( &self, auth_: &BearerToken, file_name: &str, size_bytes: Option<SafeLong>, workspace: Option<&WorkspaceRid>, body: impl LocalAsyncWriteBody<O>, ) -> Result<S3Path, Error>

Uploads a file to S3. Intended for smaller files.

Auto Trait Implementations§

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