[−][src]Module holochain_core_types::dna
dna is a library for working with holochain dna files/entries.
It includes utilities for representing dna structures in memory, as well as serializing and deserializing dna, mainly to json format.
Examples
extern crate holochain_core_types; extern crate holochain_persistence_api; extern crate holochain_json_api; use holochain_core_types::dna::Dna; use holochain_json_api::json::JsonString; use std::convert::TryFrom; let name = String::from("My Holochain DNA"); let mut dna = Dna::new(); dna.name = name.clone(); let json = JsonString::from(dna.clone()); let dna2 = Dna::try_from(json).expect("could not restore DNA from JSON"); assert_eq!(name, dna2.name);
Modules
bridges | |
capabilities | |
entry_types | File holding all the structs for handling entry types defined by DNA. |
fn_declarations | File holding all the structs for handling function declarations defined in DNA. |
traits | Module for zome trait structures |
wasm | holochain_core_types::dna::wasm is a module for managing webassembly code |
zome | holochain_core_types::dna::zome is a set of structs for working with holochain dna. |
Structs
Dna | Represents the top-level holochain dna object. |