Struct aws_sdk_s3::model::DefaultRetention
source · [−]#[non_exhaustive]pub struct DefaultRetention {
pub mode: Option<ObjectLockRetentionMode>,
pub days: i32,
pub years: i32,
}Expand description
The container element for specifying the default Object Lock retention settings for new objects placed in the specified bucket.
-
The
DefaultRetentionsettings require both a mode and a period. -
The
DefaultRetentionperiod can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mode: Option<ObjectLockRetentionMode>The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either Days or Years.
days: i32The number of days that you want to specify for the default retention period. Must be used with Mode.
years: i32The number of years that you want to specify for the default retention period. Must be used with Mode.
Implementations
sourceimpl DefaultRetention
impl DefaultRetention
sourcepub fn mode(&self) -> Option<&ObjectLockRetentionMode>
pub fn mode(&self) -> Option<&ObjectLockRetentionMode>
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either Days or Years.
sourceimpl DefaultRetention
impl DefaultRetention
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DefaultRetention
Trait Implementations
sourceimpl Clone for DefaultRetention
impl Clone for DefaultRetention
sourcefn clone(&self) -> DefaultRetention
fn clone(&self) -> DefaultRetention
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for DefaultRetention
impl Debug for DefaultRetention
sourceimpl PartialEq<DefaultRetention> for DefaultRetention
impl PartialEq<DefaultRetention> for DefaultRetention
sourcefn eq(&self, other: &DefaultRetention) -> bool
fn eq(&self, other: &DefaultRetention) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &DefaultRetention) -> bool
fn ne(&self, other: &DefaultRetention) -> bool
This method tests for !=.
impl StructuralPartialEq for DefaultRetention
Auto Trait Implementations
impl RefUnwindSafe for DefaultRetention
impl Send for DefaultRetention
impl Sync for DefaultRetention
impl Unpin for DefaultRetention
impl UnwindSafe for DefaultRetention
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more