pub enum Rejected<N>where
N: Network,{
Deployment(ProgramOwner<N>, Box<Deployment<N>>),
Execution(Box<Execution<N>>),
}Expand description
A wrapper around the rejected deployment or execution.
Variants§
Deployment(ProgramOwner<N>, Box<Deployment<N>>)
Execution(Box<Execution<N>>)
Implementations§
Source§impl<N> Rejected<N>where
N: Network,
impl<N> Rejected<N>where
N: Network,
Sourcepub fn new_deployment(
program_owner: ProgramOwner<N>,
deployment: Deployment<N>,
) -> Rejected<N>
pub fn new_deployment( program_owner: ProgramOwner<N>, deployment: Deployment<N>, ) -> Rejected<N>
Initializes a rejected deployment.
Sourcepub fn new_execution(execution: Execution<N>) -> Rejected<N>
pub fn new_execution(execution: Execution<N>) -> Rejected<N>
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>, Error>
pub fn to_unconfirmed_id(&self, fee: &Option<Fee<N>>) -> Result<Field<N>, Error>
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> Deserialize<'de> for Rejected<N>where
N: Network,
impl<'de, N> Deserialize<'de> for Rejected<N>where
N: Network,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Rejected<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Rejected<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserializes the confirmed transaction from a string or bytes.
Source§impl<N> FromBytes for Rejected<N>where
N: Network,
impl<N> FromBytes for Rejected<N>where
N: Network,
Source§fn read_le<R>(reader: R) -> Result<Rejected<N>, Error>where
R: Read,
fn read_le<R>(reader: R) -> Result<Rejected<N>, Error>where
R: Read,
Reads the rejected transaction from a buffer.
Source§fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Self from a byte array in little-endian order.Source§fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Self::from_bytes_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
Self::read_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§impl<N> Serialize for Rejected<N>where
N: Network,
impl<N> Serialize for Rejected<N>where
N: Network,
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serializes the rejected transaction into string or bytes.
impl<N> Eq for Rejected<N>
impl<N> StructuralPartialEq for Rejected<N>where
N: Network,
Auto Trait Implementations§
impl<N> Freeze for Rejected<N>
impl<N> RefUnwindSafe for Rejected<N>where
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
<N as Network>::StateRoot: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
N: RefUnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
<N as Network>::TransitionID: RefUnwindSafe,
impl<N> Send for Rejected<N>
impl<N> Sync for Rejected<N>
impl<N> Unpin for Rejected<N>
impl<N> UnwindSafe for Rejected<N>where
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
<N as Network>::StateRoot: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
N: UnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe + RefUnwindSafe,
<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
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
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.