pub struct EffectProposal {
pub proposal_id: String,
pub actor: ActorId,
pub node_id: String,
pub generation: u32,
pub effect: EffectKind,
pub path: Option<String>,
pub command: Option<CommandInvocation>,
pub network_target: Option<String>,
pub risk: RiskClass,
pub risk_cost: f64,
pub idempotency_key: String,
pub preconditions: Vec<StateWitness>,
}Expand description
An effect proposal (PSP-8 System 7).
Fields§
§proposal_id: String§actor: ActorId§node_id: String§generation: u32§effect: EffectKind§path: Option<String>The path the effect touches, if any.
command: Option<CommandInvocation>The command, if this is an execution effect.
network_target: Option<String>The network target, if any.
risk: RiskClass§risk_cost: f64Cost charged against the capability risk budget c_c.
idempotency_key: String§preconditions: Vec<StateWitness>Implementations§
Source§impl EffectProposal
impl EffectProposal
pub fn new( actor: ActorId, node_id: impl Into<String>, effect: EffectKind, ) -> Self
pub fn with_path(self, path: impl Into<String>) -> Self
pub fn with_command(self, command: CommandInvocation) -> Self
Trait Implementations§
Source§impl Clone for EffectProposal
impl Clone for EffectProposal
Source§fn clone(&self) -> EffectProposal
fn clone(&self) -> EffectProposal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EffectProposal
impl Debug for EffectProposal
Source§impl<'de> Deserialize<'de> for EffectProposal
impl<'de> Deserialize<'de> for EffectProposal
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
Source§impl PartialEq for EffectProposal
impl PartialEq for EffectProposal
Source§fn eq(&self, other: &EffectProposal) -> bool
fn eq(&self, other: &EffectProposal) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EffectProposal
impl Serialize for EffectProposal
impl StructuralPartialEq for EffectProposal
Auto Trait Implementations§
impl Freeze for EffectProposal
impl RefUnwindSafe for EffectProposal
impl Send for EffectProposal
impl Sync for EffectProposal
impl Unpin for EffectProposal
impl UnsafeUnpin for EffectProposal
impl UnwindSafe for EffectProposal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Scalar 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.