pub struct LifecycleRule {
pub id: String,
pub status: LifecycleStatus,
pub filter: LifecycleFilter,
pub expiration_days: Option<u32>,
pub expiration_date: Option<DateTime<Utc>>,
pub transitions: Vec<TransitionRule>,
pub noncurrent_version_expiration_days: Option<u32>,
pub abort_incomplete_multipart_upload_days: Option<u32>,
}Expand description
One lifecycle rule. AWS S3’s LifecycleRule flattened into the subset
the v0.6 #37 evaluator handles. id is the operator-supplied label and
makes Get / Put round-trips non-lossy.
Fields§
§id: String§status: LifecycleStatus§filter: LifecycleFilter§expiration_days: Option<u32>Days since the object was created. Mutually exclusive with
Self::expiration_date in AWS — both fields are accepted here on
input (the evaluator picks expiration_days first, then
expiration_date) so a malformed rule with both set still evaluates
deterministically rather than silently dropping the action.
expiration_date: Option<DateTime<Utc>>Calendar date past which matching objects are expired (AWS wire form
is ISO 8601; here we keep it as a DateTime<Utc> so round-trips
through serde_json survive without re-parsing).
transitions: Vec<TransitionRule>Transition steps in declaration order. The evaluator picks the
deepest transition (largest days ≤ object age) and resolves any
conflict with expiration in LifecycleManager::evaluate_with_flags.
noncurrent_version_expiration_days: Option<u32>Days an object has been noncurrent before the noncurrent-version
expiration fires. Only consulted when the evaluator is asked about
a noncurrent object (is_noncurrent = true).
abort_incomplete_multipart_upload_days: Option<u32>Days after a multipart upload is initiated before the abort fires. Stored so PutBucket round-trips, but not enforced in the v0.6 #37 evaluator — multipart sweeping lives elsewhere.
Implementations§
Source§impl LifecycleRule
impl LifecycleRule
Sourcepub fn expire_after_days(id: impl Into<String>, days: u32) -> Self
pub fn expire_after_days(id: impl Into<String>, days: u32) -> Self
Convenience constructor for a “expire after N days” rule. Useful in tests + operator scripts.
Trait Implementations§
Source§impl Clone for LifecycleRule
impl Clone for LifecycleRule
Source§fn clone(&self) -> LifecycleRule
fn clone(&self) -> LifecycleRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LifecycleRule
impl Debug for LifecycleRule
Source§impl<'de> Deserialize<'de> for LifecycleRule
impl<'de> Deserialize<'de> for LifecycleRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for LifecycleRule
impl PartialEq for LifecycleRule
Source§fn eq(&self, other: &LifecycleRule) -> bool
fn eq(&self, other: &LifecycleRule) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LifecycleRule
impl Serialize for LifecycleRule
impl Eq for LifecycleRule
impl StructuralPartialEq for LifecycleRule
Auto Trait Implementations§
impl Freeze for LifecycleRule
impl RefUnwindSafe for LifecycleRule
impl Send for LifecycleRule
impl Sync for LifecycleRule
impl Unpin for LifecycleRule
impl UnsafeUnpin for LifecycleRule
impl UnwindSafe for LifecycleRule
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.