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.
impl<N: Eq + Network> Eq for Rejected<N>
impl<N: Network> StructuralPartialEq for Rejected<N>
Auto Trait Implementations§
impl<N> Freeze for Rejected<N>where
<N as Network>::StateRoot: Freeze,
<N as Environment>::Projective: Freeze,
<N as Environment>::Scalar: Freeze,
<N as Environment>::Field: Freeze,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Freeze,
impl<N> RefUnwindSafe for Rejected<N>where
<N as Network>::StateRoot: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
<N as Network>::TransitionID: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Rejected<N>
impl<N> Sync for Rejected<N>
impl<N> Unpin for Rejected<N>where
<N as Network>::StateRoot: Unpin,
<N as Environment>::Projective: Unpin,
<N as Environment>::Scalar: Unpin,
<N as Environment>::Field: Unpin,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin,
<N as Network>::TransitionID: Unpin,
N: Unpin,
impl<N> UnwindSafe for Rejected<N>where
<N as Network>::StateRoot: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe + RefUnwindSafe,
<N as Network>::TransitionID: UnwindSafe,
N: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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