Struct holochain_types::prelude::DnaModifiers
pub struct DnaModifiers {
pub network_seed: String,
pub properties: SerializedBytes,
pub origin_time: Timestamp,
pub quantum_time: Duration,
}
Expand description
Modifiers of this DNA - the network seed, properties and origin time - as opposed to the actual DNA code. These modifiers 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.
quantum_time: Duration
The smallest unit of time used for gossip time windows. You probably don’t need to change this.
Implementations§
§impl DnaModifiers
impl DnaModifiers
pub fn update(self, modifiers: DnaModifiersOpt<SerializedBytes>) -> DnaModifiers
pub fn update(self, modifiers: DnaModifiersOpt<SerializedBytes>) -> DnaModifiers
Replace fields in the modifiers with any Some fields in the argument. None fields remain unchanged.
Trait Implementations§
§impl<'arbitrary> Arbitrary<'arbitrary> for DnaModifiers
impl<'arbitrary> Arbitrary<'arbitrary> for DnaModifiers
§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<DnaModifiers, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<DnaModifiers, Error>
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<DnaModifiers, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary> ) -> Result<DnaModifiers, Error>
Self
from the entirety of the given
unstructured data. Read more§impl Clone for DnaModifiers
impl Clone for DnaModifiers
§fn clone(&self) -> DnaModifiers
fn clone(&self) -> DnaModifiers
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for DnaModifiers
impl Debug for DnaModifiers
§impl<'de> Deserialize<'de> for DnaModifiers
impl<'de> Deserialize<'de> for DnaModifiers
§fn deserialize<__D>(
__deserializer: __D
) -> Result<DnaModifiers, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<DnaModifiers, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
§impl PartialEq<DnaModifiers> for DnaModifiers
impl PartialEq<DnaModifiers> for DnaModifiers
§fn eq(&self, other: &DnaModifiers) -> bool
fn eq(&self, other: &DnaModifiers) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Serialize for DnaModifiers
impl Serialize for DnaModifiers
§fn 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 DnaModifiers
impl StructuralEq for DnaModifiers
impl StructuralPartialEq for DnaModifiers
Auto Trait Implementations§
impl RefUnwindSafe for DnaModifiers
impl Send for DnaModifiers
impl Sync for DnaModifiers
impl Unpin for DnaModifiers
impl UnwindSafe for DnaModifiers
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
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn 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>
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.