pub struct EntitySchema {
pub name: String,
pub primary_key: String,
pub fields: Vec<EntityField>,
}Expand description
Schema definition for an entity.
Every entity automatically has a block_number field (u64) used for
reorg rollback via EntityStore::delete_after_block.
Fields§
§name: StringThe entity/table name (e.g. "erc20_transfer").
primary_key: StringThe field name used as the primary key.
fields: Vec<EntityField>The fields in this entity.
Trait Implementations§
Source§impl Clone for EntitySchema
impl Clone for EntitySchema
Source§fn clone(&self) -> EntitySchema
fn clone(&self) -> EntitySchema
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 EntitySchema
impl Debug for EntitySchema
Source§impl<'de> Deserialize<'de> for EntitySchema
impl<'de> Deserialize<'de> for EntitySchema
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
Auto Trait Implementations§
impl Freeze for EntitySchema
impl RefUnwindSafe for EntitySchema
impl Send for EntitySchema
impl Sync for EntitySchema
impl Unpin for EntitySchema
impl UnsafeUnpin for EntitySchema
impl UnwindSafe for EntitySchema
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