#[non_exhaustive]pub struct UpdateModification<'a> {
pub new_state: Option<State<'a>>,
pub related: Vec<RelatedContract>,
}
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>>
Request an other contract so updates can be resolved.
Implementations§
Source§impl<'a> UpdateModification<'a>
impl<'a> UpdateModification<'a>
Source§impl UpdateModification<'_>
impl UpdateModification<'_>
Sourcepub fn requires(related: Vec<RelatedContract>) -> Result<Self, ContractError>
pub fn requires(related: Vec<RelatedContract>) -> Result<Self, ContractError>
Constructor for self when this contract still is missing some RelatedContract
to proceed with any verification or updates.
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.
pub fn requires_dependencies(&self) -> bool
Trait Implementations§
Source§impl<'a> Debug for UpdateModification<'a>
impl<'a> Debug for UpdateModification<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for UpdateModification<'a>
impl<'de: 'a, 'a> Deserialize<'de> for UpdateModification<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for UpdateModification<'a>
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§
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