Struct snarkvm_synthesizer::prelude::Authorization
source · pub struct Authorization<N>where
N: Network,{ /* private fields */ }
Implementations§
source§impl<N> Authorization<N>where
N: Network,
impl<N> Authorization<N>where N: Network,
sourcepub fn new(request: Request<N>) -> Authorization<N>
pub fn new(request: Request<N>) -> Authorization<N>
Initialize a new Authorization
instance, with the given request.
sourcepub fn replicate(&self) -> Authorization<N>
pub fn replicate(&self) -> Authorization<N>
Returns a new and independent replica of the authorization.
source§impl<N> Authorization<N>where
N: Network,
impl<N> Authorization<N>where N: Network,
sourcepub fn is_fee_private(&self) -> bool
pub fn is_fee_private(&self) -> bool
Returns true
if the authorization is for call to credits.aleo/fee_private
.
sourcepub fn is_fee_public(&self) -> bool
pub fn is_fee_public(&self) -> bool
Returns true
if the authorization is for call to credits.aleo/fee_public
.
source§impl<N> Authorization<N>where
N: Network,
impl<N> Authorization<N>where N: Network,
sourcepub fn peek_next(&self) -> Result<Request<N>, Error>
pub fn peek_next(&self) -> Result<Request<N>, Error>
Returns the next Request
in the authorization.
sourcepub fn next(&self) -> Result<Request<N>, Error>
pub fn next(&self) -> Result<Request<N>, Error>
Returns the next Request
from the authorization.
sourcepub fn get(&self, index: usize) -> Result<Request<N>, Error>
pub fn get(&self, index: usize) -> Result<Request<N>, Error>
Returns the Request
at the given index.
sourcepub fn to_vec_deque(&self) -> VecDeque<Request<N>>
pub fn to_vec_deque(&self) -> VecDeque<Request<N>>
Returns the requests in the authorization.
source§impl<N> Authorization<N>where
N: Network,
impl<N> Authorization<N>where N: Network,
sourcepub fn insert_transition(&self, transition: Transition<N>) -> Result<(), Error>
pub fn insert_transition(&self, transition: Transition<N>) -> Result<(), Error>
Inserts the given transition into the authorization.
sourcepub fn transitions(
&self
) -> IndexMap<<N as Network>::TransitionID, Transition<N>>
pub fn transitions( &self ) -> IndexMap<<N as Network>::TransitionID, Transition<N>>
Returns the transitions in the authorization.
sourcepub fn to_execution_id(&self) -> Result<Field<N>, Error>
pub fn to_execution_id(&self) -> Result<Field<N>, Error>
Returns the execution ID for the authorization.
Trait Implementations§
source§impl<N> Clone for Authorization<N>where
N: Clone + Network,
<N as Network>::TransitionID: Clone,
impl<N> Clone for Authorization<N>where N: Clone + Network, <N as Network>::TransitionID: Clone,
source§fn clone(&self) -> Authorization<N>
fn clone(&self) -> Authorization<N>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<N> Debug for Authorization<N>where
N: Network,
impl<N> Debug for Authorization<N>where N: Network,
source§impl<'de, N> Deserialize<'de> for Authorization<N>where
N: Network,
impl<'de, N> Deserialize<'de> for Authorization<N>where N: Network,
source§fn deserialize<D>(
deserializer: D
) -> Result<Authorization<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<Authorization<N>, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserializes the authorization from a string or bytes.
source§impl<N> Display for Authorization<N>where
N: Network,
impl<N> Display for Authorization<N>where N: Network,
source§impl<N> FromBytes for Authorization<N>where
N: Network,
impl<N> FromBytes for Authorization<N>where N: Network,
source§impl<N> FromStr for Authorization<N>where
N: Network,
impl<N> FromStr for Authorization<N>where N: Network,
source§impl<N> PartialEq for Authorization<N>where
N: Network,
impl<N> PartialEq for Authorization<N>where N: Network,
source§fn eq(&self, other: &Authorization<N>) -> bool
fn eq(&self, other: &Authorization<N>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<N> Serialize for Authorization<N>where
N: Network,
impl<N> Serialize for Authorization<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 authorization into string or bytes.
source§impl<N> ToBytes for Authorization<N>where
N: Network,
impl<N> ToBytes for Authorization<N>where N: Network,
source§impl<N> TryFrom<(Vec<Request<N>>, Vec<Transition<N>>)> for Authorization<N>where
N: Network,
impl<N> TryFrom<(Vec<Request<N>>, Vec<Transition<N>>)> for Authorization<N>where N: Network,
source§fn try_from(
_: (Vec<Request<N>>, Vec<Transition<N>>)
) -> Result<Authorization<N>, Error>
fn try_from( _: (Vec<Request<N>>, Vec<Transition<N>>) ) -> Result<Authorization<N>, Error>
Initialize an Authorization
instance, with the given requests and transitions.
Note: This method is used primarily for serialization, and requires the number of requests and transitions to match.
impl<N> Eq for Authorization<N>where N: Network,
Auto Trait Implementations§
impl<N> !RefUnwindSafe for Authorization<N>
impl<N> Send for Authorization<N>
impl<N> Sync for Authorization<N>
impl<N> Unpin for Authorization<N>
impl<N> !UnwindSafe for Authorization<N>
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
§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
§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
key
and return true
if they are equal.