pub enum Rejected<N: Network> {
Deployment(ProgramOwner<N>, Box<Deployment<N>>),
Execution(Execution<N>),
}
Expand description
A wrapper around the rejected deployment or execution.
Variants§
Deployment(ProgramOwner<N>, Box<Deployment<N>>)
Execution(Execution<N>)
Implementations§
source§impl<N: Network> Rejected<N>
impl<N: Network> Rejected<N>
sourcepub fn new_deployment(
program_owner: ProgramOwner<N>,
deployment: Deployment<N>
) -> Self
pub fn new_deployment( program_owner: ProgramOwner<N>, deployment: Deployment<N> ) -> Self
Initializes a rejected deployment.
sourcepub fn new_execution(execution: Execution<N>) -> Self
pub fn new_execution(execution: Execution<N>) -> Self
Initializes a rejected execution.
sourcepub fn is_deployment(&self) -> bool
pub fn is_deployment(&self) -> bool
Returns true if the rejected transaction is a deployment.
sourcepub fn is_execution(&self) -> bool
pub fn is_execution(&self) -> bool
Returns true if the rejected transaction is an execution.
sourcepub fn program_owner(&self) -> Option<&ProgramOwner<N>>
pub fn program_owner(&self) -> Option<&ProgramOwner<N>>
Returns the program owner of the rejected deployment.
sourcepub fn deployment(&self) -> Option<&Deployment<N>>
pub fn deployment(&self) -> Option<&Deployment<N>>
Returns the rejected deployment.
sourcepub fn to_unconfirmed_id(&self, fee: &Option<Fee<N>>) -> Result<Field<N>>
pub fn to_unconfirmed_id(&self, fee: &Option<Fee<N>>) -> Result<Field<N>>
Returns the unconfirmed transaction ID, which is defined as the transaction ID prior to confirmation. When a transaction is rejected, its fee transition is used to construct the confirmed transaction ID, changing the original transaction ID.
Trait Implementations§
source§impl<'de, N: Network> Deserialize<'de> for Rejected<N>
impl<'de, N: Network> Deserialize<'de> for Rejected<N>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the confirmed transaction from a string or bytes.
source§impl<N: PartialEq + Network> PartialEq for Rejected<N>
impl<N: PartialEq + Network> PartialEq for Rejected<N>
impl<N: Eq + Network> Eq for Rejected<N>
impl<N: Network> StructuralEq for Rejected<N>
impl<N: Network> StructuralPartialEq for Rejected<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for Rejected<N>where N: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe, <N as Network>::StateRoot: RefUnwindSafe, <N as Network>::TransitionID: RefUnwindSafe,
impl<N> Send for Rejected<N>
impl<N> Sync for Rejected<N>
impl<N> Unpin for Rejected<N>where N: Unpin, <N as Environment>::Field: Unpin, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin, <N as Network>::StateRoot: Unpin, <N as Network>::TransitionID: Unpin,
impl<N> UnwindSafe for Rejected<N>where N: UnwindSafe, <N as Environment>::Field: UnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe + RefUnwindSafe, <N as Environment>::Projective: UnwindSafe, <N as Environment>::Scalar: UnwindSafe, <N as Network>::StateRoot: UnwindSafe, <N as Network>::TransitionID: UnwindSafe,
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
§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.