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>
impl<N> Clone for Authorization<N>
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§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> Freeze for Authorization<N>
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more