pub struct AssetPurgeSettings {
pub auto_purge_enabled: bool,
pub retention_days: i32,
}Expand description
孤儿素材自动清理配置(uploads/ 中无引用的图片)。
Fields§
§auto_purge_enabled: bool是否启用自动定时清理。
retention_days: i32孤儿素材保留天数,超过后被后台任务物理删除。
Implementations§
Source§impl AssetPurgeSettings
impl AssetPurgeSettings
Sourcepub fn clamp_retention(days: i32) -> i32
pub fn clamp_retention(days: i32) -> i32
将保留天数钳制到合法范围 [MIN, MAX]。
Trait Implementations§
Source§impl Clone for AssetPurgeSettings
impl Clone for AssetPurgeSettings
Source§fn clone(&self) -> AssetPurgeSettings
fn clone(&self) -> AssetPurgeSettings
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 AssetPurgeSettings
impl Debug for AssetPurgeSettings
Source§impl Default for AssetPurgeSettings
impl Default for AssetPurgeSettings
Source§impl<'de> Deserialize<'de> for AssetPurgeSettings
impl<'de> Deserialize<'de> for AssetPurgeSettings
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AssetPurgeSettings
impl PartialEq for AssetPurgeSettings
Source§impl Serialize for AssetPurgeSettings
impl Serialize for AssetPurgeSettings
impl StructuralPartialEq for AssetPurgeSettings
Auto Trait Implementations§
impl Freeze for AssetPurgeSettings
impl RefUnwindSafe for AssetPurgeSettings
impl Send for AssetPurgeSettings
impl Sync for AssetPurgeSettings
impl Unpin for AssetPurgeSettings
impl UnsafeUnpin for AssetPurgeSettings
impl UnwindSafe for AssetPurgeSettings
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,
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.
§impl<T> Transportable for Twhere
T: Serialize + DeserializeOwned + 'static,
impl<T> Transportable for Twhere
T: Serialize + DeserializeOwned + 'static,
§fn transport_to_bytes(&self) -> Vec<u8> ⓘ
fn transport_to_bytes(&self) -> Vec<u8> ⓘ
Serialize the type to a byte vector for transport
§fn transport_from_bytes(bytes: &[u8]) -> Result<T, Error<Error>>
fn transport_from_bytes(bytes: &[u8]) -> Result<T, Error<Error>>
Deserialize the type from a byte slice