[][src]Enum holochain_core_types::dna::bridges::BridgeReference

pub enum BridgeReference {
    Address {
        dna_address: Address,
    },
    Trait {
        traits: BTreeMap<String, Trait>,
    },
}

This enum represents the two different ways of referring to another DNA instance. If we know a priori what exact version of another DNA we want to bridge to we can specify the DNA address (i.e. hash) and lock it in. Often, we need more flexibility when

  • the other DNA gets replaced by a newer version
  • the other DNA gets created from a template and thus we don't know the exact hash during build-time
  • we want to build a complex system of components that should be pluggable. Bridges can therefore also be specified by traits. That means we specify a list of functions with their signatures and allow the conductor (through the conductor bridge config) to resolve this bridge by any DNA instance that implements all specified functions, just like a dynamic binding of function calls.

Variants

Address

A bridge reference that defines another DNA statically by its address (i.e. hash). If this variant is used the other DNA gets locked in as per DNA address

Fields of Address

dna_address: Address
Trait

A bridge reference that defines another DNA loosely by expecting a DNA that implements a given set of traits, i.e. that has specific sets of zome functions with matching signatures.

Fields of Trait

traits: BTreeMap<String, Trait>

Trait Implementations

impl Clone for BridgeReference[src]

impl Debug for BridgeReference[src]

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

impl Hash for BridgeReference[src]

impl PartialEq<BridgeReference> for BridgeReference[src]

impl Serialize for BridgeReference[src]

impl StructuralPartialEq for BridgeReference[src]

Auto Trait Implementations

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: Deserialize<'de>, 
[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>,