pub struct DagVertex {
pub id: String,
pub node_id: String,
pub transaction: Transaction,
pub parents: Vec<String>,
pub timestamp: DateTime<Utc>,
pub vector_clock: HashMap<String, u64>,
pub signature: String,
}Expand description
A vertex in the consensus DAG
Fields§
§id: StringUnique vertex ID
node_id: StringNode that created this vertex
transaction: TransactionTransaction data
parents: Vec<String>Parent vertices (edges in the DAG)
timestamp: DateTime<Utc>Timestamp when vertex was created
vector_clock: HashMap<String, u64>Vector clock for causality tracking
signature: StringSignature (in production, this would be cryptographic)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DagVertex
impl<'de> Deserialize<'de> for DagVertex
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 DagVertex
impl RefUnwindSafe for DagVertex
impl Send for DagVertex
impl Sync for DagVertex
impl Unpin for DagVertex
impl UnwindSafe for DagVertex
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