pub struct FunctionalContract {
pub contract_id: String,
pub target_asset_digest: u64,
pub max_divergence_epsilon: f32,
pub max_volume_expansion_ratio: f32,
pub required_flags: u32,
pub forbidden_flags: u32,
}Expand description
Functional contract defining invariant guarantees across two scene states.
Fields§
§contract_id: String§target_asset_digest: u64§max_divergence_epsilon: f32§max_volume_expansion_ratio: f32§required_flags: u32§forbidden_flags: u32Implementations§
Source§impl FunctionalContract
impl FunctionalContract
Sourcepub fn new(
contract_id: impl Into<String>,
target_asset_digest: u64,
max_divergence_epsilon: f32,
max_volume_expansion_ratio: f32,
required_flags: u32,
forbidden_flags: u32,
) -> Self
pub fn new( contract_id: impl Into<String>, target_asset_digest: u64, max_divergence_epsilon: f32, max_volume_expansion_ratio: f32, required_flags: u32, forbidden_flags: u32, ) -> Self
Creates a default FunctionalContract.
Sourcepub fn verify(
&self,
asset: &AssetIdentity,
state_a: &SceneState,
state_b: &SceneState,
) -> ContractVerificationReceipt
pub fn verify( &self, asset: &AssetIdentity, state_a: &SceneState, state_b: &SceneState, ) -> ContractVerificationReceipt
Verify invariant guarantees between State A (base) and State B (conditioned/transformed).
Trait Implementations§
Source§impl Clone for FunctionalContract
impl Clone for FunctionalContract
Source§impl Debug for FunctionalContract
impl Debug for FunctionalContract
Source§impl PartialEq for FunctionalContract
impl PartialEq for FunctionalContract
impl StructuralPartialEq for FunctionalContract
Auto Trait Implementations§
impl Freeze for FunctionalContract
impl RefUnwindSafe for FunctionalContract
impl Send for FunctionalContract
impl Sync for FunctionalContract
impl Unpin for FunctionalContract
impl UnsafeUnpin for FunctionalContract
impl UnwindSafe for FunctionalContract
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more