Struct tame_gcs::objects::Object [−][src]
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]
id: &OID,
optional: Option<DeleteObjectOptional<'_>>
) -> Result<Request<Empty>, Error> where
OID: ObjectIdentifier<'a>,
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
impl Object
[src]
pub fn download<'a, OID: ?Sized>(
id: &OID,
optional: Option<DownloadObjectOptional<'_>>
) -> Result<Request<Empty>, Error> where
OID: ObjectIdentifier<'a>,
[src]
id: &OID,
optional: Option<DownloadObjectOptional<'_>>
) -> Result<Request<Empty>, Error> where
OID: ObjectIdentifier<'a>,
Downloads an object
Required IAM Permissions: storage.objects.get
, storage.objects.getIamPolicy
*
impl Object
[src]
pub fn get<'a, OID: ?Sized>(
id: &OID,
optional: Option<GetObjectOptional<'_>>
) -> Result<Request<Empty>, Error> where
OID: ObjectIdentifier<'a>,
[src]
id: &OID,
optional: Option<GetObjectOptional<'_>>
) -> Result<Request<Empty>, Error> where
OID: ObjectIdentifier<'a>,
Gets an object’s metadata
Required IAM Permissions: storage.objects.get
, storage.objects.getIamPolicy
*
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]
id: &OID,
content: B,
length: u64,
optional: Option<InsertObjectOptional<'_>>
) -> Result<Request<B>, Error> where
OID: ObjectIdentifier<'a>,
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.
pub fn insert_multipart<B>(
bucket: &BucketName<'_>,
content: B,
length: u64,
metadata: &Metadata,
optional: Option<InsertObjectOptional<'_>>
) -> Result<Request<Multipart<B>>, Error>
[src]
bucket: &BucketName<'_>,
content: B,
length: u64,
metadata: &Metadata,
optional: Option<InsertObjectOptional<'_>>
) -> Result<Request<Multipart<B>>, Error>
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.
impl Object
[src]
pub fn list(
bucket: &BucketName<'_>,
optional: Option<ListOptional<'_>>
) -> Result<Request<Empty>, Error>
[src]
bucket: &BucketName<'_>,
optional: Option<ListOptional<'_>>
) -> Result<Request<Empty>, Error>
Retrieves a list of objects matching the criteria.
Required IAM Permissions: storage.objects.list
, storage.objects.getIamPolicy
*
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]
id: &OID,
metadata: &Metadata,
optional: Option<PatchObjectOptional<'_>>
) -> Result<Request<Cursor<Vec<u8>>>, Error> where
OID: ObjectIdentifier<'a>,
Updates a data blob’s associated metadata.
Required IAM Permissions: storage.objects.get
, storage.objects.update
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,