Config

Struct Config 

Source
pub struct Config;

Trait Implementations§

Source§

impl Config for Config

Source§

fn check_ulids()

Auto-generated by crdb::db!. Read more
Source§

async fn reencode_old_versions<D: Db>(call_on: &D) -> usize

Source§

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>>

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>>

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 remove_event<D: ClientSideDb>( db: &D, type_id: TypeId, object_id: ObjectId, event_id: EventId, ) -> Result<()>

Source§

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>>>

Source§

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>)>>

Source§

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>)>>

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>.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> Send for T
where T: Send,

Source§

impl<T> Sync for T
where T: Sync,