Struct b2_client::file::UpdateFileRetentionBuilder
source · [−]pub struct UpdateFileRetentionBuilder<'a> { /* private fields */ }Expand description
A builder for an UpdateFileRetention request.
Implementations
sourceimpl<'a> UpdateFileRetentionBuilder<'a>
impl<'a> UpdateFileRetentionBuilder<'a>
sourcepub fn file_name(
self,
file_name: &'a str
) -> Result<Self, FileNameValidationError>
pub fn file_name(
self,
file_name: &'a str
) -> Result<Self, FileNameValidationError>
The name of the file to update.
The file ID is also required.
sourcepub fn file_id(self, file_id: &'a str) -> Self
pub fn file_id(self, file_id: &'a str) -> Self
The ID of the file to update.
The file name is also required.
sourcepub fn file_retention(self, retention: FileRetentionSetting) -> Self
pub fn file_retention(self, retention: FileRetentionSetting) -> Self
The new file retention settings for the file.
See https://www.backblaze.com/b2/docs/file_lock.html#b2_api_file_lock_parameters for more information.
sourcepub fn bypass_governance(self) -> Self
pub fn bypass_governance(self) -> Self
Bypass governance rules to allow deleting or shortening an existing governance-mode retention setting.
The authorization must include Capability::BypassGovernance.
sourcepub fn build(self) -> Result<UpdateFileRetention<'a>, MissingData>
pub fn build(self) -> Result<UpdateFileRetention<'a>, MissingData>
Create an UpdateFileRetention request.
Trait Implementations
sourceimpl<'a> Default for UpdateFileRetentionBuilder<'a>
impl<'a> Default for UpdateFileRetentionBuilder<'a>
sourcefn default() -> UpdateFileRetentionBuilder<'a>
fn default() -> UpdateFileRetentionBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for UpdateFileRetentionBuilder<'a>
impl<'a> Send for UpdateFileRetentionBuilder<'a>
impl<'a> Sync for UpdateFileRetentionBuilder<'a>
impl<'a> Unpin for UpdateFileRetentionBuilder<'a>
impl<'a> UnwindSafe for UpdateFileRetentionBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more