[−][src]Struct holochain_core_types::dna::Dna
Represents the top-level holochain dna object.
Fields
name: String
The top-level "name" of a holochain application.
description: String
The top-level "description" of a holochain application.
version: String
The semantic version of your holochain application.
uuid: String
A unique identifier to distinguish your holochain application.
dna_spec_version: String
Which version of the holochain dna spec does this represent?
properties: Value
Any arbitrary application properties can be included in this object.
zomes: BTreeMap<String, Zome>
An array of zomes associated with your holochain application.
Methods
impl Dna
[src]
pub fn new() -> Self
[src]
Create a new in-memory dna structure with some default values.
Examples
use holochain_core_types::dna::Dna; let dna = Dna::new(); assert_eq!("", dna.name);
pub fn to_json_pretty(&self) -> Result<String>
[src]
Generate a pretty-printed json string from an in-memory dna struct.
Examples
use holochain_core_types::dna::Dna; let dna = Dna::new(); println!("json: {}", dna.to_json_pretty().expect("DNA should serialize"));
pub fn get_zome(&self, zome_name: &str) -> Result<&Zome, DnaError>
[src]
Return a Zome
pub fn get_trait<'a>(
&'a self,
zome: &'a Zome,
trait_name: &str
) -> Option<&'a TraitFns>
[src]
&'a self,
zome: &'a Zome,
trait_name: &str
) -> Option<&'a TraitFns>
Return a Zome's TraitFns from a Zome and a Trait name.
pub fn get_function_with_zome_name(
&self,
zome_name: &str,
fn_name: &str
) -> Result<&FnDeclaration, DnaError>
[src]
&self,
zome_name: &str,
fn_name: &str
) -> Result<&FnDeclaration, DnaError>
Return a Zome Function declaration from a Zome name and Function name.
pub fn get_wasm_from_zome_name<T: Into<String>>(
&self,
zome_name: T
) -> Option<&DnaWasm>
[src]
&self,
zome_name: T
) -> Option<&DnaWasm>
Find a Zome and return it's WASM bytecode
pub fn get_trait_fns_with_zome_name(
&self,
zome_name: &str,
trait_name: &str
) -> Result<&TraitFns, DnaError>
[src]
&self,
zome_name: &str,
trait_name: &str
) -> Result<&TraitFns, DnaError>
Return a Zome's Trait functions from a Zome name and trait name.
pub fn get_zome_name_for_app_entry_type(
&self,
app_entry_type: &AppEntryType
) -> Option<String>
[src]
&self,
app_entry_type: &AppEntryType
) -> Option<String>
Return the name of the zome holding a specified app entry_type
pub fn get_entry_type_def(&self, entry_type_name: &str) -> Option<&EntryTypeDef>
[src]
Return the entry_type definition of a specified app entry_type
pub fn multihash(&self) -> Result<Vec<u8>, HolochainError>
[src]
pub fn get_required_bridges(&self) -> Vec<Bridge>
[src]
pub fn verify(&self) -> HcResult<()>
[src]
Trait Implementations
impl<'a> From<&'a Dna> for JsonString
[src]
fn from(v: &Dna) -> JsonString
[src]
impl From<Dna> for JsonString
[src]
fn from(v: Dna) -> JsonString
[src]
impl Clone for Dna
[src]
impl Default for Dna
[src]
impl PartialEq<Dna> for Dna
[src]
impl Debug for Dna
[src]
impl<'a> TryFrom<&'a JsonString> for Dna
[src]
type Error = JsonError
The type returned in the event of a conversion error.
fn try_from(json_string: &JsonString) -> Result<Self, Self::Error>
[src]
impl TryFrom<JsonString> for Dna
[src]
type Error = JsonError
The type returned in the event of a conversion error.
fn try_from(json_string: JsonString) -> Result<Self, Self::Error>
[src]
impl Hash for Dna
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Serialize for Dna
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Dna
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl AddressableContent for Dna
[src]
fn content(&self) -> Content
[src]
fn try_from_content(content: &Content) -> JsonResult<Self>
[src]
fn address(&self) -> HashString
[src]
Auto Trait Implementations
impl Send for Dna
impl Sync for Dna
impl Unpin for Dna
impl UnwindSafe for Dna
impl RefUnwindSafe for Dna
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,