pub struct NamespaceTtlPolicy {
pub default_ttl_seconds: Option<u64>,
pub max_ttl_seconds: Option<u64>,
pub min_ttl_seconds: Option<u64>,
pub ttl_required: bool,
pub custom_cleanup_interval: Option<Duration>,
pub exempt_from_cleanup: bool,
}Expand description
TTL policy for a specific namespace
Fields§
§default_ttl_seconds: Option<u64>Default TTL for vectors without explicit TTL (None = no default)
max_ttl_seconds: Option<u64>Maximum allowed TTL (None = unlimited)
min_ttl_seconds: Option<u64>Minimum allowed TTL (None = no minimum)
ttl_required: boolWhether TTL is required for all vectors
custom_cleanup_interval: Option<Duration>Custom cleanup interval for this namespace (overrides global)
exempt_from_cleanup: boolWhether this namespace is exempt from automatic cleanup
Implementations§
Source§impl NamespaceTtlPolicy
impl NamespaceTtlPolicy
Sourcepub fn with_default_ttl(seconds: u64) -> Self
pub fn with_default_ttl(seconds: u64) -> Self
Create a new policy with default TTL
Sourcepub fn with_max_ttl(self, seconds: u64) -> Self
pub fn with_max_ttl(self, seconds: u64) -> Self
Set maximum TTL
Sourcepub fn with_min_ttl(self, seconds: u64) -> Self
pub fn with_min_ttl(self, seconds: u64) -> Self
Set minimum TTL
Trait Implementations§
Source§impl Clone for NamespaceTtlPolicy
impl Clone for NamespaceTtlPolicy
Source§fn clone(&self) -> NamespaceTtlPolicy
fn clone(&self) -> NamespaceTtlPolicy
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 moreSource§impl Debug for NamespaceTtlPolicy
impl Debug for NamespaceTtlPolicy
Source§impl Default for NamespaceTtlPolicy
impl Default for NamespaceTtlPolicy
Source§fn default() -> NamespaceTtlPolicy
fn default() -> NamespaceTtlPolicy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NamespaceTtlPolicy
impl RefUnwindSafe for NamespaceTtlPolicy
impl Send for NamespaceTtlPolicy
impl Sync for NamespaceTtlPolicy
impl Unpin for NamespaceTtlPolicy
impl UnsafeUnpin for NamespaceTtlPolicy
impl UnwindSafe for NamespaceTtlPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more