diff options
author | 2025-04-08 10:38:18 +0100 | |
---|---|---|
committer | 2025-04-08 10:38:18 +0100 | |
commit | 5b644e2dc8712d56931b410b9c46dae1ef36e691 (patch) | |
tree | 2290b3ab2a5829c3b8406ce073a95474e146a680 /filamento/src/files.rs | |
parent | c24541b129a14a598afe00ed4244d49d27513310 (diff) | |
download | luz-5b644e2dc8712d56931b410b9c46dae1ef36e691.tar.gz luz-5b644e2dc8712d56931b410b9c46dae1ef36e691.tar.bz2 luz-5b644e2dc8712d56931b410b9c46dae1ef36e691.zip |
feat(filamento): user avatar publishing and processing
Diffstat (limited to 'filamento/src/files.rs')
-rw-r--r-- | filamento/src/files.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/filamento/src/files.rs b/filamento/src/files.rs new file mode 100644 index 0000000..0dfe347 --- /dev/null +++ b/filamento/src/files.rs @@ -0,0 +1,19 @@ +use std::error::Error; + +pub trait FileStore { + type Err: Clone + Send + Error; + + fn is_stored( + &self, + name: &str, + ) -> impl std::future::Future<Output = Result<bool, Self::Err>> + std::marker::Send; + fn store( + &self, + name: &str, + data: &[u8], + ) -> impl std::future::Future<Output = Result<(), Self::Err>> + std::marker::Send; + fn delete( + &self, + name: &str, + ) -> impl std::future::Future<Output = Result<(), Self::Err>> + std::marker::Send; +} |