Struct holochain_types::prelude::DnaModifiers
source · [−]pub struct DnaModifiers {
pub network_seed: String,
pub properties: SerializedBytes,
pub origin_time: Timestamp,
}
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.
Implementations
sourceimpl DnaModifiers
impl DnaModifiers
sourcepub 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
sourceimpl<'arbitrary> Arbitrary<'arbitrary> for DnaModifiers
impl<'arbitrary> Arbitrary<'arbitrary> for DnaModifiers
sourcefn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<DnaModifiers, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<DnaModifiers, Error>
Self
from the given unstructured data. Read moresourcefn 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 moresourceimpl Clone for DnaModifiers
impl Clone for DnaModifiers
sourcefn clone(&self) -> DnaModifiers
fn clone(&self) -> DnaModifiers
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for DnaModifiers
impl Debug for DnaModifiers
sourceimpl<'de> Deserialize<'de> for DnaModifiers
impl<'de> Deserialize<'de> for DnaModifiers
sourcefn 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>,
sourceimpl PartialEq<DnaModifiers> for DnaModifiers
impl PartialEq<DnaModifiers> for DnaModifiers
sourcefn eq(&self, other: &DnaModifiers) -> bool
fn eq(&self, other: &DnaModifiers) -> bool
sourceimpl Serialize for DnaModifiers
impl Serialize for DnaModifiers
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 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> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
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.impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn 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 morefn 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.