[][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

#![feature(try_from)]
extern crate holochain_core_types;
use holochain_core_types::dna::Dna;
use holochain_core_types::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);

Re-exports

pub use dna::dna::Dna;

Modules

bridges
capabilities

File holding all the structs for handling capabilities

dna
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.