pub struct FolderRules {
pub ignore_hidden: bool,
pub max_file_size_mb: Option<u64>,
pub allowed_extensions: Vec<String>,
pub sync_method: FolderSyncMethod,
pub startup_catchup_mode: Option<StartupCatchupMode>,
pub delete_folder_to_album: bool,
pub delete_album_to_folder: bool,
pub include_xmp_sidecar: Option<bool>,
}Expand description
Defines per-folder filters and guardrails applied before a file is queued for upload.
Fields§
True if hidden files/folders should be ignored during sync.
max_file_size_mb: Option<u64>Maximum file size allowed for upload, in Megabytes.
allowed_extensions: Vec<String>List of file extensions permitted for sync.
sync_method: FolderSyncMethodSelected synchronization direction method.
startup_catchup_mode: Option<StartupCatchupMode>Override startup catch-up mode, or None to use global setting.
delete_folder_to_album: boolDelete local file when its corresponding remote asset is removed.
delete_album_to_folder: boolDelete remote asset when its corresponding local file is removed.
include_xmp_sidecar: Option<bool>Per-folder override for XMP sidecar upload. None inherits the global
upload_xmp_sidecars setting; Some(true/false) overrides it.
Implementations§
Source§impl FolderRules
impl FolderRules
Sourcepub fn normalized_extensions(&self) -> Vec<String>
pub fn normalized_extensions(&self) -> Vec<String>
Return the list of allowed extensions trimmed and lowercased.
Sourcepub fn matches(&self, path: &Path) -> bool
pub fn matches(&self, path: &Path) -> bool
Check if a specific file path meets all active folder validation rules.
Sourcepub fn xmp_sidecar_enabled(&self, global_default: bool) -> bool
pub fn xmp_sidecar_enabled(&self, global_default: bool) -> bool
Resolve whether XMP sidecar upload is enabled for this folder.
Returns the per-folder override when set, otherwise falls back to the caller-supplied global default.
Trait Implementations§
Source§impl Clone for FolderRules
impl Clone for FolderRules
Source§fn clone(&self) -> FolderRules
fn clone(&self) -> FolderRules
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 FolderRules
impl Debug for FolderRules
Source§impl Default for FolderRules
impl Default for FolderRules
Source§fn default() -> FolderRules
fn default() -> FolderRules
Source§impl<'de> Deserialize<'de> for FolderRules
impl<'de> Deserialize<'de> for FolderRules
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>,
impl Eq for FolderRules
Source§impl PartialEq for FolderRules
impl PartialEq for FolderRules
Source§fn eq(&self, other: &FolderRules) -> bool
fn eq(&self, other: &FolderRules) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for FolderRules
impl Serialize for FolderRules
impl StructuralPartialEq for FolderRules
Auto Trait Implementations§
impl Freeze for FolderRules
impl RefUnwindSafe for FolderRules
impl Send for FolderRules
impl Sync for FolderRules
impl Unpin for FolderRules
impl UnsafeUnpin for FolderRules
impl UnwindSafe for FolderRules
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
§impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
§fn default_with_context(_: Ctx) -> T
fn default_with_context(_: Ctx) -> T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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>
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>
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>
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