pub struct TestObjectDelegatePerms(pub DbPtr<TestObjectPerms>);
Tuple Fields§
§0: DbPtr<TestObjectPerms>
Implementations§
Source§impl TestObjectDelegatePerms
impl TestObjectDelegatePerms
pub fn standardize(&mut self, _self_id: ObjectId)
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for TestObjectDelegatePerms
impl<'arbitrary> Arbitrary<'arbitrary> for TestObjectDelegatePerms
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§impl Clone for TestObjectDelegatePerms
impl Clone for TestObjectDelegatePerms
Source§fn clone(&self) -> TestObjectDelegatePerms
fn clone(&self) -> TestObjectDelegatePerms
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TestObjectDelegatePerms
impl Debug for TestObjectDelegatePerms
Source§impl DeepSizeOf for TestObjectDelegatePerms
impl DeepSizeOf for TestObjectDelegatePerms
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Returns an estimation of the heap-managed storage of this object.
This does not include the size of the object itself. Read more
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
Returns an estimation of a total size of memory owned by the
object, including heap-managed storage. Read more
Source§impl<'de> Deserialize<'de> for TestObjectDelegatePerms
impl<'de> Deserialize<'de> for TestObjectDelegatePerms
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Object for TestObjectDelegatePerms
impl Object for TestObjectDelegatePerms
Source§type Event = TestEventDelegatePerms
type Event = TestEventDelegatePerms
Note that due to postgresql limitations reasons, this type MUST NOT include any
null byte in the serialized JSON. Trying to submit one such event will result
in the event being rejected by the server.
fn type_ulid() -> &'static TypeId
async fn can_create<'a, C: CanDoCallbacks>( &'a self, _user: User, _self_id: ObjectId, _db: &'a C, ) -> Result<bool>
Source§async fn can_apply<'a, C: CanDoCallbacks>(
&'a self,
_user: User,
_self_id: ObjectId,
_event: &'a Self::Event,
_db: &'a C,
) -> Result<bool>
async fn can_apply<'a, C: CanDoCallbacks>( &'a self, _user: User, _self_id: ObjectId, _event: &'a Self::Event, _db: &'a C, ) -> Result<bool>
Note that permissions are always checked with the latest version of the object on the server.
So, due to this, CRDB objects are not strictly speaking a CRDT. However, it is required to do
so for security, because otherwise a user who lost permissions would still be allowed to
submit events antidated to before the permission loss, which would be bad as users could
re-grant themselves permissions.
Source§async fn users_who_can_read<'a, C: CanDoCallbacks>(
&'a self,
db: &'a C,
) -> Result<HashSet<User>>
async fn users_who_can_read<'a, C: CanDoCallbacks>( &'a self, db: &'a C, ) -> Result<HashSet<User>>
Note that
db.get
calls will be cached. So: Read morefn apply(&mut self, _self_id: DbPtr<Self>, event: &Self::Event)
fn required_binaries(&self) -> Vec<BinPtr>
fn snapshot_version() -> i32
Source§impl Ord for TestObjectDelegatePerms
impl Ord for TestObjectDelegatePerms
Source§fn cmp(&self, other: &TestObjectDelegatePerms) -> Ordering
fn cmp(&self, other: &TestObjectDelegatePerms) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TestObjectDelegatePerms
impl PartialEq for TestObjectDelegatePerms
Source§impl PartialOrd for TestObjectDelegatePerms
impl PartialOrd for TestObjectDelegatePerms
Source§impl Serialize for TestObjectDelegatePerms
impl Serialize for TestObjectDelegatePerms
impl Eq for TestObjectDelegatePerms
impl StructuralPartialEq for TestObjectDelegatePerms
Auto Trait Implementations§
impl Freeze for TestObjectDelegatePerms
impl RefUnwindSafe for TestObjectDelegatePerms
impl Send for TestObjectDelegatePerms
impl Sync for TestObjectDelegatePerms
impl Unpin for TestObjectDelegatePerms
impl UnwindSafe for TestObjectDelegatePerms
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