From fb55682c66092921f766f82c16eb9e046f1bbb41 Mon Sep 17 00:00:00 2001 From: Yureka Date: Sun, 3 Mar 2024 14:56:52 +0100 Subject: add request context helper --- src/model/bucket_table.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/model/bucket_table.rs') diff --git a/src/model/bucket_table.rs b/src/model/bucket_table.rs index 4c48a76f..1dbdfac2 100644 --- a/src/model/bucket_table.rs +++ b/src/model/bucket_table.rs @@ -191,6 +191,13 @@ impl Bucket { } } + pub fn present(id: Uuid, params: BucketParams) -> Self { + Bucket { + id, + state: crdt::Deletable::present(params), + } + } + /// Returns true if this represents a deleted bucket pub fn is_deleted(&self) -> bool { self.state.is_deleted() -- cgit v1.2.3