pub struct Config;
Trait Implementations§
Source§impl Config for Config
impl Config for Config
Source§fn check_ulids()
fn check_ulids()
Auto-generated by
crdb::db!
. Read moreasync fn reencode_old_versions<D: Db>(call_on: &D) -> usize
async fn create<D: Db>( db: &D, type_id: TypeId, object_id: ObjectId, created_at: EventId, snapshot_version: i32, object: &Value, ) -> Result<()>
Source§async fn recreate<D: ClientSideDb>(
db: &D,
type_id: TypeId,
object_id: ObjectId,
created_at: EventId,
snapshot_version: i32,
object: &Value,
updatedness: Option<Updatedness>,
additional_importance: Importance,
) -> Result<Option<Value>>
async fn recreate<D: ClientSideDb>( db: &D, type_id: TypeId, object_id: ObjectId, created_at: EventId, snapshot_version: i32, object: &Value, updatedness: Option<Updatedness>, additional_importance: Importance, ) -> Result<Option<Value>>
The returned serde_json::Value is guaranteed to be a serialization of the latest snapshot of the object at the current snapshot version
Source§async fn submit<D: Db>(
db: &D,
type_id: TypeId,
object_id: ObjectId,
event_id: EventId,
event: &Value,
updatedness: Option<Updatedness>,
additional_importance: Importance,
) -> Result<Option<Value>>
async fn submit<D: Db>( db: &D, type_id: TypeId, object_id: ObjectId, event_id: EventId, event: &Value, updatedness: Option<Updatedness>, additional_importance: Importance, ) -> Result<Option<Value>>
The returned serde_json::Value is guaranteed to be a serialization of the latest snapshot of the object at the current snapshot version
async fn remove_event<D: ClientSideDb>( db: &D, type_id: TypeId, object_id: ObjectId, event_id: EventId, ) -> Result<()>
async fn get_users_who_can_read<'a, D: ServerSideDb, C: CanDoCallbacks>( call_on: &'a D, object_id: ObjectId, type_id: TypeId, snapshot_version: i32, snapshot: Value, cb: &'a C, ) -> Result<UsersWhoCanRead<D::Lock<'a>>>
async fn recreate_no_lock<'a, D: ServerSideDb, C: CanDoCallbacks>( call_on: &'a D, type_id: TypeId, object_id: ObjectId, event_id: EventId, updatedness: Updatedness, cb: &'a C, ) -> Result<Option<(EventId, i32, Value, HashSet<User>)>>
async fn upload_object<'a, D: ServerSideDb>( call_on: &'a D, user: User, updatedness: Updatedness, type_id: TypeId, object_id: ObjectId, created_at: EventId, snapshot_version: i32, snapshot: Arc<Value>, ) -> Result<Option<(Arc<UpdatesWithSnap>, HashSet<User>, Vec<ReadPermsChanges>)>>
Source§async fn upload_event<'a, D: ServerSideDb>(
call_on: &'a D,
user: User,
updatedness: Updatedness,
type_id: TypeId,
object_id: ObjectId,
event_id: EventId,
event_data: Arc<Value>,
) -> Result<Option<(Arc<UpdatesWithSnap>, Vec<User>, Vec<ReadPermsChanges>)>>
async fn upload_event<'a, D: ServerSideDb>( call_on: &'a D, user: User, updatedness: Updatedness, type_id: TypeId, object_id: ObjectId, event_id: EventId, event_data: Arc<Value>, ) -> Result<Option<(Arc<UpdatesWithSnap>, Vec<User>, Vec<ReadPermsChanges>)>>
The
Vec<User>
in return type is the list of users who can read the object both before and after the change. Users who gained or
lost access to object_id
are returned as part of the Vec<ReadPermsChanges>
.impl Sealed for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more