pub struct BaseEntityData {
pub id: u64,
pub version: i64,
pub dynamic: BTreeMap<String, Value>,
}Fields§
§id: u64§version: i64§dynamic: BTreeMap<String, Value>Implementations§
Source§impl BaseEntityData
impl BaseEntityData
pub fn new() -> Self
pub fn with_id(self, id: u64) -> Self
pub fn with_version(self, version: i64) -> Self
pub fn with_dynamic( self, key: impl Into<String>, value: impl Into<Value>, ) -> Self
pub fn dynamic(&self, key: &str) -> Option<&Value>
pub fn dynamic_i64(&self, key: &str) -> Option<i64>
pub fn dynamic_u64(&self, key: &str) -> Option<u64>
pub fn dynamic_decimal(&self, key: &str) -> Option<Decimal>
pub fn dynamic_f64(&self, key: &str) -> Option<f64>
pub fn dynamic_text(&self, key: &str) -> Option<&str>
pub fn dynamic_bool(&self, key: &str) -> Option<bool>
pub fn put_dynamic( &mut self, key: impl Into<String>, value: impl Into<Value>, ) -> Option<Value>
pub fn remove_dynamic(&mut self, key: &str) -> Option<Value>
pub fn to_record(&self) -> Record
pub fn from_record(record: &Record) -> Result<Self, EntityError>
Trait Implementations§
Source§impl Clone for BaseEntityData
impl Clone for BaseEntityData
Source§fn clone(&self) -> BaseEntityData
fn clone(&self) -> BaseEntityData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BaseEntityData
impl Debug for BaseEntityData
Source§impl Default for BaseEntityData
impl Default for BaseEntityData
Source§fn default() -> BaseEntityData
fn default() -> BaseEntityData
Returns the “default value” for a type. Read more
Source§impl PartialEq for BaseEntityData
impl PartialEq for BaseEntityData
Source§fn eq(&self, other: &BaseEntityData) -> bool
fn eq(&self, other: &BaseEntityData) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BaseEntityData
Auto Trait Implementations§
impl Freeze for BaseEntityData
impl RefUnwindSafe for BaseEntityData
impl Send for BaseEntityData
impl Sync for BaseEntityData
impl Unpin for BaseEntityData
impl UnsafeUnpin for BaseEntityData
impl UnwindSafe for BaseEntityData
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