pub struct BackupSettings {
pub auto_enabled: bool,
pub time_utc: String,
pub retention_count: i32,
pub include_uploads: bool,
}Expand description
自动备份配置。
Fields§
§auto_enabled: bool是否启用每天定时备份。
time_utc: String每天执行时间(UTC,“HH:MM”)。面板负责浏览器本地时区转换。
retention_count: i32自动备份保留份数,超出后最旧的连配对 uploads 包一起删除。
include_uploads: bool备份产物是否包含 uploads 打包(tar.gz,排除可重建的 .cache)。
Implementations§
Source§impl BackupSettings
impl BackupSettings
Sourcepub fn clamp_retention(count: i32) -> i32
pub fn clamp_retention(count: i32) -> i32
将保留份数钳制到合法范围 [MIN, MAX]。
Sourcepub fn is_valid_time_utc(s: &str) -> bool
pub fn is_valid_time_utc(s: &str) -> bool
校验 “HH:MM” 是否合法(env 播种等需要严格拒绝脏输入的场景用)。
Sourcepub fn normalize_time_utc(s: &str) -> String
pub fn normalize_time_utc(s: &str) -> String
规范化 “HH:MM”:容忍单数字小时/分钟与前后空白,输出零填充; 非法输入回退默认时间(面板/调度永不因脏数据停摆)。
Trait Implementations§
Source§impl Clone for BackupSettings
impl Clone for BackupSettings
Source§fn clone(&self) -> BackupSettings
fn clone(&self) -> BackupSettings
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 BackupSettings
impl Debug for BackupSettings
Source§impl Default for BackupSettings
impl Default for BackupSettings
Source§impl<'de> Deserialize<'de> for BackupSettings
impl<'de> Deserialize<'de> for BackupSettings
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 BackupSettings
impl PartialEq for BackupSettings
Source§impl Serialize for BackupSettings
impl Serialize for BackupSettings
impl StructuralPartialEq for BackupSettings
Auto Trait Implementations§
impl Freeze for BackupSettings
impl RefUnwindSafe for BackupSettings
impl Send for BackupSettings
impl Sync for BackupSettings
impl Unpin for BackupSettings
impl UnsafeUnpin for BackupSettings
impl UnwindSafe for BackupSettings
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