Struct tame_gcs::objects::Object[][src]

pub struct Object;

Helper struct used to collate all of the operations available for Objects

Implementations

impl Object[src]

pub fn delete<'a, OID: ?Sized>(
    id: &OID,
    optional: Option<DeleteObjectOptional<'_>>
) -> Result<Request<Empty>, Error> where
    OID: ObjectIdentifier<'a>, 
[src]

Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.

Required IAM Permissions: storage.objects.delete

Complete API documentation

impl Object[src]

pub fn download<'a, OID: ?Sized>(
    id: &OID,
    optional: Option<DownloadObjectOptional<'_>>
) -> Result<Request<Empty>, Error> where
    OID: ObjectIdentifier<'a>, 
[src]

Downloads an object

Required IAM Permissions: storage.objects.get, storage.objects.getIamPolicy*

Complete API Documentation

impl Object[src]

pub fn get<'a, OID: ?Sized>(
    id: &OID,
    optional: Option<GetObjectOptional<'_>>
) -> Result<Request<Empty>, Error> where
    OID: ObjectIdentifier<'a>, 
[src]

Gets an object’s metadata

Required IAM Permissions: storage.objects.get, storage.objects.getIamPolicy*

Complete API Documentation

impl Object[src]

pub fn insert_simple<'a, OID: ?Sized, B>(
    id: &OID,
    content: B,
    length: u64,
    optional: Option<InsertObjectOptional<'_>>
) -> Result<Request<B>, Error> where
    OID: ObjectIdentifier<'a>, 
[src]

Stores a new object and metadata.

  • Maximum file size: 5TB
  • Accepted Media MIME types: */*

Required IAM Permissions: storage.objects.create, storage.objects.delete

Note: storage.objects.delete is only needed if an object with the same name already exists.

Complete API Documentation

pub fn insert_multipart<B>(
    bucket: &BucketName<'_>,
    content: B,
    length: u64,
    metadata: &Metadata,
    optional: Option<InsertObjectOptional<'_>>
) -> Result<Request<Multipart<B>>, Error>
[src]

Stores a new object and metadata.

  • Maximum file size: 5TB
  • Accepted Media MIME types: */*

This method differs from insert_simple in that it performs a multipart upload which allows you specify both the object data and its metadata in a single request, instead of having to do an additional request to set the metadata.

NOTE: You must specify the name field in the metadata provided to this function with a valid object name. Only the content_type specified in metadata will be used, the content_type in optional will be ignored.

Required IAM Permissions: storage.objects.create, storage.objects.delete

Note: storage.objects.delete is only needed if an object with the same name already exists.

Complete API Documentation

impl Object[src]

pub fn list(
    bucket: &BucketName<'_>,
    optional: Option<ListOptional<'_>>
) -> Result<Request<Empty>, Error>
[src]

Retrieves a list of objects matching the criteria.

Required IAM Permissions: storage.objects.list, storage.objects.getIamPolicy*

Complete API Documentation

impl Object[src]

pub fn patch<'a, OID: ?Sized>(
    id: &OID,
    metadata: &Metadata,
    optional: Option<PatchObjectOptional<'_>>
) -> Result<Request<Cursor<Vec<u8>>>, Error> where
    OID: ObjectIdentifier<'a>, 
[src]

Updates a data blob’s associated metadata.

Required IAM Permissions: storage.objects.get, storage.objects.update

Complete API documentation

Auto Trait Implementations

impl RefUnwindSafe for Object

impl Send for Object

impl Sync for Object

impl Unpin for Object

impl UnwindSafe for Object

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.