Struct locutus_runtime::prelude::UpdateModification
source · #[non_exhaustive]pub struct UpdateModification<'a> {
pub new_state: Option<State<'a>>,
pub related: Vec<RelatedContract, Global>,
}Expand description
An update to a contract state or any required related contracts to update that state.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.new_state: Option<State<'a>>Implementations§
source§impl<'a> UpdateModification<'a>
impl<'a> UpdateModification<'a>
sourcepub fn valid(new_state: State<'a>) -> UpdateModification<'a>
pub fn valid(new_state: State<'a>) -> UpdateModification<'a>
Constructor for self when the state is valid.
sourcepub fn requires(related: Vec<RelatedContract, Global>) -> UpdateModification<'a>
pub fn requires(related: Vec<RelatedContract, Global>) -> UpdateModification<'a>
Constructor for self when this contract still is missing some RelatedContract
to proceed with any verification or updates.
sourcepub fn unwrap_valid(self) -> State<'a> ⓘ
pub fn unwrap_valid(self) -> State<'a> ⓘ
Unwraps self returning a State.
Panics if self does not contain a state.
Gets the pending related contracts.
sourcepub fn into_owned(self) -> UpdateModification<'static>
pub fn into_owned(self) -> UpdateModification<'static>
Copies the data if not owned and returns an owned version of self.
Trait Implementations§
source§impl<'a> Debug for UpdateModification<'a>
impl<'a> Debug for UpdateModification<'a>
source§impl<'de, 'a> Deserialize<'de> for UpdateModification<'a>where
'de: 'a,
impl<'de, 'a> Deserialize<'de> for UpdateModification<'a>where
'de: 'a,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<UpdateModification<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<UpdateModification<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> Serialize for UpdateModification<'a>
impl<'a> Serialize for UpdateModification<'a>
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
Auto Trait Implementations§
impl<'a> RefUnwindSafe for UpdateModification<'a>
impl<'a> Send for UpdateModification<'a>
impl<'a> Sync for UpdateModification<'a>
impl<'a> Unpin for UpdateModification<'a>
impl<'a> UnwindSafe for UpdateModification<'a>
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.
§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<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<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
§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