Struct holochain_types::prelude::DnaModifiersOpt
pub struct DnaModifiersOpt<P = SerializedBytes> {
pub network_seed: Option<String>,
pub properties: Option<P>,
pub origin_time: Option<Timestamp>,
pub quantum_time: Option<Duration>,
}
Expand description
DnaModifiers
options of which all are optional.
Fields§
§network_seed: Option<String>
see DnaModifiers
properties: Option<P>
see DnaModifiers
origin_time: Option<Timestamp>
see DnaModifiers
quantum_time: Option<Duration>
see DnaModifiers
Implementations§
§impl<P, E> DnaModifiersOpt<P>where
P: TryInto<SerializedBytes, Error = E>,
E: Into<SerializedBytesError>,
impl<P, E> DnaModifiersOpt<P>where P: TryInto<SerializedBytes, Error = E>, E: Into<SerializedBytesError>,
pub fn none() -> DnaModifiersOpt<P>
pub fn none() -> DnaModifiersOpt<P>
Constructor with all fields set to None
pub fn serialized(self) -> Result<DnaModifiersOpt<SerializedBytes>, E>
pub fn serialized(self) -> Result<DnaModifiersOpt<SerializedBytes>, E>
Serialize the properties field into SerializedBytes
pub fn with_network_seed(self, network_seed: String) -> DnaModifiersOpt<P>
pub fn with_network_seed(self, network_seed: String) -> DnaModifiersOpt<P>
Return a modified form with the network_seed
field set
pub fn with_properties(self, properties: P) -> DnaModifiersOpt<P>
pub fn with_properties(self, properties: P) -> DnaModifiersOpt<P>
Return a modified form with the properties
field set
pub fn with_origin_time(self, origin_time: Timestamp) -> DnaModifiersOpt<P>
pub fn with_origin_time(self, origin_time: Timestamp) -> DnaModifiersOpt<P>
Return a modified form with the origin_time
field set
pub fn with_quantum_time(self, quantum_time: Duration) -> DnaModifiersOpt<P>
pub fn with_quantum_time(self, quantum_time: Duration) -> DnaModifiersOpt<P>
Return a modified form with the quantum_time
field set
pub fn has_some_option_set(&self) -> bool
pub fn has_some_option_set(&self) -> bool
Check if at least one of the options is set.
Trait Implementations§
§impl<'arbitrary, P> Arbitrary<'arbitrary> for DnaModifiersOpt<P>where
P: Arbitrary<'arbitrary>,
impl<'arbitrary, P> Arbitrary<'arbitrary> for DnaModifiersOpt<P>where P: Arbitrary<'arbitrary>,
§fn arbitrary(
u: &mut Unstructured<'arbitrary>
) -> Result<DnaModifiersOpt<P>, Error>
fn arbitrary( u: &mut Unstructured<'arbitrary> ) -> Result<DnaModifiersOpt<P>, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<DnaModifiersOpt<P>, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary> ) -> Result<DnaModifiersOpt<P>, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read more§impl<P> Clone for DnaModifiersOpt<P>where
P: Clone,
impl<P> Clone for DnaModifiersOpt<P>where P: Clone,
§fn clone(&self) -> DnaModifiersOpt<P>
fn clone(&self) -> DnaModifiersOpt<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<P> Debug for DnaModifiersOpt<P>where
P: Debug,
impl<P> Debug for DnaModifiersOpt<P>where P: Debug,
§impl<P, E> Default for DnaModifiersOpt<P>where
P: TryInto<SerializedBytes, Error = E>,
E: Into<SerializedBytesError>,
impl<P, E> Default for DnaModifiersOpt<P>where P: TryInto<SerializedBytes, Error = E>, E: Into<SerializedBytesError>,
§fn default() -> DnaModifiersOpt<P>
fn default() -> DnaModifiersOpt<P>
Returns the “default value” for a type. Read more
§impl<'de, P> Deserialize<'de> for DnaModifiersOpt<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for DnaModifiersOpt<P>where P: Deserialize<'de>,
§fn deserialize<__D>(
__deserializer: __D
) -> Result<DnaModifiersOpt<P>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<DnaModifiersOpt<P>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<P> PartialEq<DnaModifiersOpt<P>> for DnaModifiersOpt<P>where
P: PartialEq<P>,
impl<P> PartialEq<DnaModifiersOpt<P>> for DnaModifiersOpt<P>where P: PartialEq<P>,
§fn eq(&self, other: &DnaModifiersOpt<P>) -> bool
fn eq(&self, other: &DnaModifiersOpt<P>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<P> Serialize for DnaModifiersOpt<P>where
P: Serialize,
impl<P> Serialize for DnaModifiersOpt<P>where P: Serialize,
§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,
Serialize this value into the given Serde serializer. Read more
impl<P> Eq for DnaModifiersOpt<P>where P: Eq,
impl<P> StructuralEq for DnaModifiersOpt<P>
impl<P> StructuralPartialEq for DnaModifiersOpt<P>
Auto Trait Implementations§
impl<P> RefUnwindSafe for DnaModifiersOpt<P>where P: RefUnwindSafe,
impl<P> Send for DnaModifiersOpt<P>where P: Send,
impl<P> Sync for DnaModifiersOpt<P>where P: Sync,
impl<P> Unpin for DnaModifiersOpt<P>where P: Unpin,
impl<P> UnwindSafe for DnaModifiersOpt<P>where P: UnwindSafe,
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
§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>
Deserializes using the given deserializer
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
Compare self to
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
Checks if this value is equivalent to the given key. Read more
§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
Checks if this value is equivalent to the given key. Read more
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>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.§impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref