support redirection on s3 endpoint

This commit is contained in:
trinity-1686a
2024-12-14 17:46:27 +01:00
committed by Alex Auvolat
parent 00b8239a2b
commit e0f8a72a81
8 changed files with 1063 additions and 128 deletions
+10
View File
@@ -9,6 +9,16 @@ pub enum Deletable<T> {
Deleted,
}
impl<T> Deletable<T> {
/// Map value, used for migrations
pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Deletable<U> {
match self {
Self::Present(x) => Deletable::<U>::Present(f(x)),
Self::Deleted => Deletable::<U>::Deleted,
}
}
}
impl<T: Crdt> Deletable<T> {
/// Create a new deletable object that isn't deleted
pub fn present(v: T) -> Self {