Struct holochain_zome_types::dna_def::DnaDef
source · [−]pub struct DnaDef {
pub name: String,
pub uid: String,
pub properties: SerializedBytes,
pub zomes: Zomes,
}
Expand description
The definition of a DNA: the hash of this data is what produces the DnaHash.
Historical note: This struct was written before DnaManifest
appeared.
It is included as part of a DnaFile
. There is still a lot of code that uses
this type, but in function, it has mainly been superseded by DnaManifest
.
TODO: after removing the InstallApp
admin method, we can remove the Serialize
impl on this type, and document it/rename it to show that it is
basically a fully validated, normalized DnaManifest
Fields
name: String
The friendly “name” of a Holochain DNA.
uid: String
A UID for uniquifying this Dna.
properties: SerializedBytes
Any arbitrary application properties can be included in this object.
zomes: Zomes
A vector of zomes associated with your DNA.
Implementations
Create a DnaDef with a random UID, useful for testing
Return a Zome, error if not a WasmZome
Change the “phenotype” of this DNA – the UID and properties – while leaving the “genotype” of actual DNA code intact
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Return a subset of the content, either as SerializedBytes “content”, which will be used to compute the hash, or as an already precomputed hash which will be used directly Read more
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for DnaDef
impl !UnwindSafe for DnaDef
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
impl<T, C> HashableContentExtSync<T> for C where
T: HashTypeSync,
C: HashableContent<HashType = T>,
impl<T, C> HashableContentExtSync<T> for C where
T: HashTypeSync,
C: HashableContent<HashType = T>,
Move into a HoloHashed
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more