pub struct ModifyLabelsRequest { /* private fields */ }Expand description
A request builder to modify the labels in a file.
Implementations§
Source§impl ModifyLabelsRequest
impl ModifyLabelsRequest
Sourcepub fn new(credentials: &Credentials, file_id: impl AsRef<str>) -> Self
pub fn new(credentials: &Credentials, file_id: impl AsRef<str>) -> Self
Creates a new ModifyLabelsRequest builder, authorized with the given Credentials.
Sourcepub fn fields<T>(self, value: T) -> Self
pub fn fields<T>(self, value: T) -> Self
You can set this parameter to return the exact fields you need, and improve performance in your method call.
§Note:
By default, the server sends back a set of fields specific to the resource being queried. For example, the files.get method might only return the id, name, and mimeType for the files resource. The permissions.get method returns a different set of default fields for a permissions resource.
See Google’s documentation
Sourcepub fn modifications<T>(self, value: T) -> Self
pub fn modifications<T>(self, value: T) -> Self
Sets the metadata that the updated file will have in Google Drive.
Source§impl ModifyLabelsRequest
impl ModifyLabelsRequest
Sourcepub fn execute(&self) -> Result<Vec<Label>>
pub fn execute(&self) -> Result<Vec<Label>>
Executes this request.
§Errors
- a
UrlParsingerror, if the creation of the request URL failed. - a
Jsonerror, if unable to parse the destination file to JSON. - a
Requesterror, if unable to send the request or get a body from the response. - a
Responseerror, if the request returned an error response.
Trait Implementations§
Source§impl Clone for ModifyLabelsRequest
impl Clone for ModifyLabelsRequest
Source§fn clone(&self) -> ModifyLabelsRequest
fn clone(&self) -> ModifyLabelsRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ModifyLabelsRequest
impl RefUnwindSafe for ModifyLabelsRequest
impl Send for ModifyLabelsRequest
impl Sync for ModifyLabelsRequest
impl Unpin for ModifyLabelsRequest
impl UnwindSafe for ModifyLabelsRequest
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
Mutably borrows from an owned value. Read more