INNER CODE UNIT · Rust

len

CympleTech/ESSE · types/data/src/lib.rs:6

    fn len() -> usize;
    fn proof_len() -> usize;

    fn verify(&self, data: &Data<Self>) -> bool;
    fn id_to_bytes(&self) -> Vec<u8>;
    fn proof_to_bytes(proof: &Self::Proof) -> Vec<u8>;
    fn id_from_bytes(id_bytes: &[u8]) -> Result<Self, ()>;
    fn proof_from_bytes(proof_bytes: &[u8]) -> Result<Self::Proof, ()>;
}

/// common data structure.
#[derive(Clone, Eq, PartialEq)]
pub struct Data<T: OwnerId> {
    /// Data unique ID, default generate method is other fields hash.
    pub did: DataId,
    /// ParentID, default is None.
    pub pid: Option<DataId>,
    /// time lifetime, (from, to) timestamp.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…