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§
Source§impl<P, E> DnaModifiersOpt<P>
impl<P, E> DnaModifiersOpt<P>
Sourcepub fn none() -> DnaModifiersOpt<P>
pub fn none() -> DnaModifiersOpt<P>
Constructor with all fields set to None
Sourcepub fn serialized(self) -> Result<DnaModifiersOpt, E>
pub fn serialized(self) -> Result<DnaModifiersOpt, E>
Serialize the properties field into SerializedBytes
Sourcepub 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
Sourcepub 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
Sourcepub 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
Sourcepub 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
Sourcepub 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§
Source§impl<P> Clone for DnaModifiersOpt<P>where
P: Clone,
impl<P> Clone for DnaModifiersOpt<P>where
P: Clone,
Source§fn clone(&self) -> DnaModifiersOpt<P>
fn clone(&self) -> DnaModifiersOpt<P>
Returns a duplicate 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 moreSource§impl<P> Debug for DnaModifiersOpt<P>where
P: Debug,
impl<P> Debug for DnaModifiersOpt<P>where
P: Debug,
Source§impl<P, E> Default for DnaModifiersOpt<P>
impl<P, E> Default for DnaModifiersOpt<P>
Source§fn default() -> DnaModifiersOpt<P>
fn default() -> DnaModifiersOpt<P>
Returns the “default value” for a type. Read more
Source§impl<'de, P> Deserialize<'de> for DnaModifiersOpt<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for DnaModifiersOpt<P>where
P: Deserialize<'de>,
Source§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
Source§impl<P> PartialEq for DnaModifiersOpt<P>where
P: PartialEq,
impl<P> PartialEq for DnaModifiersOpt<P>where
P: PartialEq,
Source§impl<P> Serialize for DnaModifiersOpt<P>where
P: Serialize,
impl<P> Serialize for DnaModifiersOpt<P>where
P: Serialize,
Source§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> StructuralPartialEq for DnaModifiersOpt<P>
Auto Trait Implementations§
impl<P> Freeze for DnaModifiersOpt<P>where
P: Freeze,
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§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.Source§impl<T> Upcastable for T
impl<T> Upcastable for T
Source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
Source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref