Struct b2_client::file::UpdateFileLegalHoldBuilder
source · [−]pub struct UpdateFileLegalHoldBuilder<'a> { /* private fields */ }Expand description
A builder for an UpdateFileLegalHold request.
Implementations
sourceimpl<'a> UpdateFileLegalHoldBuilder<'a>
impl<'a> UpdateFileLegalHoldBuilder<'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>
Update the legal hold status for a file with the specified name.
Setting 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
Update the legal hold status for a file with the specified ID.
Setting the file_name is also required.
sourcepub fn with_legal_hold(self) -> Self
pub fn with_legal_hold(self) -> Self
Enable a legal hold.
sourcepub fn without_legal_hold(self) -> Self
pub fn without_legal_hold(self) -> Self
Disable a legal hold.
sourcepub fn build(self) -> Result<UpdateFileLegalHold<'a>, MissingData>
pub fn build(self) -> Result<UpdateFileLegalHold<'a>, MissingData>
Build an UpdateFileLegalHold request.
Returns an error if any of the file name, file ID, or legal hold status are not specified.
Trait Implementations
sourceimpl<'a> Default for UpdateFileLegalHoldBuilder<'a>
impl<'a> Default for UpdateFileLegalHoldBuilder<'a>
sourcefn default() -> UpdateFileLegalHoldBuilder<'a>
fn default() -> UpdateFileLegalHoldBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for UpdateFileLegalHoldBuilder<'a>
impl<'a> Send for UpdateFileLegalHoldBuilder<'a>
impl<'a> Sync for UpdateFileLegalHoldBuilder<'a>
impl<'a> Unpin for UpdateFileLegalHoldBuilder<'a>
impl<'a> UnwindSafe for UpdateFileLegalHoldBuilder<'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