pub struct Entity {
pub liability: u64,
pub id: EntityId,
}
Expand description
Container for single liability & ID entry into the tree.
The proof of liabilities protocol operates on a list of objects. Each object must be of the same type, and the structure of this type is defined by the entity struct. There is a 1-1 mapping from entity to bottom layer leaf node in the binary tree.
More often than not the data fed to the protocol is expected to be related to people, or users. So an entity can be thought of as a user. ‘Entity’ was chosen above ‘user’ because it has a more general connotation.
The entity struct has only 2 fields: ID and liability.
Fields§
§liability: u64
§id: EntityId
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entity
impl<'de> Deserialize<'de> for Entity
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 PartialEq for Entity
impl PartialEq for Entity
impl StructuralPartialEq for Entity
Auto Trait Implementations§
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
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