[][src]Struct holochain_core_types::dna::zome::Zome

pub struct Zome {
    pub description: String,
    pub config: Config,
    pub entry_types: ZomeEntryTypes,
    pub traits: ZomeTraits,
    pub fn_declarations: ZomeFnDeclarations,
    pub code: DnaWasm,
    pub bridges: Vec<Bridge>,
}

Represents an individual "zome".

Fields

description: String

A description of this zome.

config: Config

Configuration associated with this zome. Note, this should perhaps be a more free-form serde_json::Value, "throw-errors" may not make sense for wasm, or other ribosome types.

entry_types: ZomeEntryTypes

An array of entry_types associated with this zome.

traits: ZomeTraits

An array of traits defined in this zome.

fn_declarations: ZomeFnDeclarations

An array of functions declared in this this zome.

code: DnaWasm

Validation code for this entry_type.

bridges: Vec<Bridge>

A list of bridges to other DNAs that this DNA can use or depends on.

Implementations

impl Zome[src]

pub fn empty() -> Self[src]

Provide defaults for an individual "zome".

pub fn new(
    description: &str,
    config: &Config,
    entry_types: &BTreeMap<EntryType, EntryTypeDef>,
    fn_declarations: &[FnDeclaration],
    traits: &BTreeMap<String, TraitFns>,
    code: &DnaWasm
) -> Zome
[src]

Allow sane defaults for Zome::new().

pub fn get_required_bridges(&self) -> Vec<Bridge>[src]

pub fn add_fn_declaration(
    &mut self,
    name: String,
    inputs: Vec<FnParameter>,
    outputs: Vec<FnParameter>
)
[src]

Add a function declaration to a Zome

pub fn get_function(&self, fn_name: &str) -> Option<&FnDeclaration>[src]

Return a Function declaration from a Zome

pub fn is_fn_public(&self, fn_name: &str) -> bool[src]

Trait Implementations

impl Clone for Zome[src]

impl Debug for Zome[src]

impl<'de> Deserialize<'de> for Zome[src]

impl Eq for Zome[src]

impl<'a> From<&'a Zome> for JsonString[src]

impl From<Zome> for JsonString[src]

impl PartialEq<Zome> for Zome[src]

impl Serialize for Zome[src]

impl StructuralPartialEq for Zome[src]

impl<'a> TryFrom<&'a JsonString> for Zome[src]

type Error = JsonError

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Zome[src]

type Error = JsonError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Zome

impl Send for Zome

impl Sync for Zome

impl Unpin for Zome

impl UnwindSafe for Zome

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clone for T where
    T: Clone
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,