Skip to main content

BaseEntity

Trait BaseEntity 

Source
pub trait BaseEntity: Entity {
Show 14 methods // Required methods fn base(&self) -> &BaseEntityData; fn base_mut(&mut self) -> &mut BaseEntityData; // Provided methods fn id(&self) -> Option<u64> { ... } fn set_id(&mut self, id: u64) { ... } fn version_value(&self) -> i64 { ... } fn set_version(&mut self, version: i64) { ... } fn dynamic(&self, key: &str) -> Option<&Value> { ... } fn dynamic_i64(&self, key: &str) -> Option<i64> { ... } fn dynamic_u64(&self, key: &str) -> Option<u64> { ... } fn dynamic_decimal(&self, key: &str) -> Option<Decimal> { ... } fn dynamic_f64(&self, key: &str) -> Option<f64> { ... } fn dynamic_text(&self, key: &str) -> Option<&str> { ... } fn dynamic_bool(&self, key: &str) -> Option<bool> { ... } fn put_dynamic( &mut self, key: impl Into<String>, value: impl Into<Value>, ) -> Option<Value> { ... }
}

Required Methods§

Source

fn base(&self) -> &BaseEntityData

Source

fn base_mut(&mut self) -> &mut BaseEntityData

Provided Methods§

Source

fn id(&self) -> Option<u64>

Source

fn set_id(&mut self, id: u64)

Source

fn version_value(&self) -> i64

Source

fn set_version(&mut self, version: i64)

Source

fn dynamic(&self, key: &str) -> Option<&Value>

Source

fn dynamic_i64(&self, key: &str) -> Option<i64>

Source

fn dynamic_u64(&self, key: &str) -> Option<u64>

Source

fn dynamic_decimal(&self, key: &str) -> Option<Decimal>

Source

fn dynamic_f64(&self, key: &str) -> Option<f64>

Source

fn dynamic_text(&self, key: &str) -> Option<&str>

Source

fn dynamic_bool(&self, key: &str) -> Option<bool>

Source

fn put_dynamic( &mut self, key: impl Into<String>, value: impl Into<Value>, ) -> Option<Value>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§