feat: advanced filters backend logic (#4688)

* feat: implement advanced filters

* test: adapt tests to changes

* test: add advanced filter tests

* chore: adapt flutter frontend to changes

* chore: adapt tauri frontend to changes

* chore: bump collab

* chore: launch review

---------

Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
Richard Shiue
2024-03-14 09:35:45 +08:00
committed by GitHub
parent 80e210b34a
commit 48cac4c5ac
50 changed files with 1915 additions and 1514 deletions

View File

@ -2,6 +2,7 @@ use std::any::Any;
use anyhow::Result;
#[derive(Debug)]
pub struct BoxAny(Box<dyn Any + Send + Sync + 'static>);
impl BoxAny {
@ -12,6 +13,13 @@ impl BoxAny {
Self(Box::new(value))
}
pub fn cloned<T>(&self) -> Option<T>
where
T: Clone + 'static,
{
self.0.downcast_ref::<T>().cloned()
}
pub fn unbox_or_default<T>(self) -> T
where
T: Default + 'static,