JMAP for File Storage implementation (closes #2218)

This commit is contained in:
mdecimus
2025-10-03 16:52:34 +02:00
parent d000b5975a
commit c47413a42b
32 changed files with 1683 additions and 38 deletions

View File

@@ -4,7 +4,10 @@
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
*/
use std::borrow::Cow;
use ahash::{AHashMap, AHashSet};
use serde::Deserialize;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct GlobPattern {
@@ -207,3 +210,15 @@ impl<V> Default for GlobMap<V> {
GlobMap::new()
}
}
impl<'de> Deserialize<'de> for GlobPattern {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
Ok(GlobPattern::compile(
<Cow<&str>>::deserialize(deserializer)?.as_ref(),
true,
))
}
}