Struct hdk::prelude::DnaPhenotype
source · [−]pub struct DnaPhenotype {
pub network_seed: String,
pub properties: SerializedBytes,
pub origin_time: Timestamp,
}
Expand description
“Phenotype” of this DNA - the network seed, properties and origin time - as opposed to its “genotype” - the actual DNA code. The phenotype fields are included in the DNA hash computation.
Fields
network_seed: String
The network seed of a DNA is included in the computation of the DNA hash. The DNA hash in turn determines the network peers and the DHT, meaning that only peers with the same DNA hash of a shared DNA participate in the same network and co-create the DHT. To create a separate DHT for the DNA, a unique network seed can be specified.
properties: SerializedBytes
Any arbitrary application properties can be included in this object.
origin_time: Timestamp
The time used to denote the origin of the network, used to calculate time windows during gossip. All Action timestamps must come after this time.
Implementations
sourceimpl DnaPhenotype
impl DnaPhenotype
sourcepub fn update(self, phenotype: DnaPhenotypeOpt<SerializedBytes>) -> DnaPhenotype
pub fn update(self, phenotype: DnaPhenotypeOpt<SerializedBytes>) -> DnaPhenotype
Replace fields in the phenotype with any Some fields in the argument. None fields remain unchanged.
Trait Implementations
sourceimpl Clone for DnaPhenotype
impl Clone for DnaPhenotype
sourcefn clone(&self) -> DnaPhenotype
fn clone(&self) -> DnaPhenotype
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for DnaPhenotype
impl Debug for DnaPhenotype
sourceimpl<'de> Deserialize<'de> for DnaPhenotype
impl<'de> Deserialize<'de> for DnaPhenotype
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<DnaPhenotype, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<DnaPhenotype, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
sourceimpl PartialEq<DnaPhenotype> for DnaPhenotype
impl PartialEq<DnaPhenotype> for DnaPhenotype
sourcefn eq(&self, other: &DnaPhenotype) -> bool
fn eq(&self, other: &DnaPhenotype) -> bool
sourceimpl Serialize for DnaPhenotype
impl Serialize for DnaPhenotype
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for DnaPhenotype
impl StructuralEq for DnaPhenotype
impl StructuralPartialEq for DnaPhenotype
Auto Trait Implementations
impl RefUnwindSafe for DnaPhenotype
impl Send for DnaPhenotype
impl Sync for DnaPhenotype
impl Unpin for DnaPhenotype
impl UnwindSafe for DnaPhenotype
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;