pub struct TestObjectSimple(pub Vec<u8>);
Tuple Fields§
§0: Vec<u8>
Implementations§
Source§impl TestObjectSimple
impl TestObjectSimple
pub fn new(v: Vec<u8>) -> TestObjectSimple
pub fn standardize(&mut self, _self_id: ObjectId)
pub fn stub_1() -> TestObjectSimple
pub fn stub_2() -> TestObjectSimple
pub fn stub_3() -> TestObjectSimple
pub fn stub_4() -> TestObjectSimple
pub fn stub_5() -> TestObjectSimple
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for TestObjectSimple
impl<'arbitrary> Arbitrary<'arbitrary> for TestObjectSimple
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 TestObjectSimple
impl Clone for TestObjectSimple
Source§fn clone(&self) -> TestObjectSimple
fn clone(&self) -> TestObjectSimple
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 TestObjectSimple
impl Debug for TestObjectSimple
Source§impl DeepSizeOf for TestObjectSimple
impl DeepSizeOf for TestObjectSimple
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 TestObjectSimple
impl<'de> Deserialize<'de> for TestObjectSimple
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 TestObjectSimple
impl Object for TestObjectSimple
Source§type Event = TestEventSimple
type Event = TestEventSimple
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 TestObjectSimple
impl Ord for TestObjectSimple
Source§fn cmp(&self, other: &TestObjectSimple) -> Ordering
fn cmp(&self, other: &TestObjectSimple) -> 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 TestObjectSimple
impl PartialEq for TestObjectSimple
Source§impl PartialOrd for TestObjectSimple
impl PartialOrd for TestObjectSimple
Source§impl Serialize for TestObjectSimple
impl Serialize for TestObjectSimple
impl Eq for TestObjectSimple
impl StructuralPartialEq for TestObjectSimple
Auto Trait Implementations§
impl Freeze for TestObjectSimple
impl RefUnwindSafe for TestObjectSimple
impl Send for TestObjectSimple
impl Sync for TestObjectSimple
impl Unpin for TestObjectSimple
impl UnwindSafe for TestObjectSimple
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