pub struct DynamicFuture<A: Aleo> { /* private fields */ }Expand description
A dynamic future is a fixed-size representation of a future. Like static
Futures, a dynamic future contains a program name, program network, and function name. These
are however represented as Field elements as opposed to Identifiers to
ensure a fixed size. Dynamic futures also store a checksum of the
arguments to the future instead of the arguments themselves. This ensures
that all dynamic futures have a constant size, regardless of the amount of
data they contain.
Note: The checksum is never computed in circuit. It is computed in console
as truncate_252(Sha3_256(length_prefix || type_prefixed_argument_bits)) and
injected as a witness field element.
Implementations§
Source§impl<A: Aleo> DynamicFuture<A>
impl<A: Aleo> DynamicFuture<A>
Sourcepub const fn program_name(&self) -> &Field<A>
pub const fn program_name(&self) -> &Field<A>
Returns the program name.
Sourcepub const fn program_network(&self) -> &Field<A>
pub const fn program_network(&self) -> &Field<A>
Returns the program network.
Sourcepub const fn function_name(&self) -> &Field<A>
pub const fn function_name(&self) -> &Field<A>
Returns the function name.
Trait Implementations§
Source§impl<A: Clone + Aleo> Clone for DynamicFuture<A>
impl<A: Clone + Aleo> Clone for DynamicFuture<A>
Source§fn clone(&self) -> DynamicFuture<A>
fn clone(&self) -> DynamicFuture<A>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<A: Aleo> Eject for DynamicFuture<A>
impl<A: Aleo> Eject for DynamicFuture<A>
Source§fn eject_mode(&self) -> Mode
fn eject_mode(&self) -> Mode
Ejects the mode of the dynamic future.
Source§fn eject_value(&self) -> Self::Primitive
fn eject_value(&self) -> Self::Primitive
Ejects the dynamic future.
type Primitive = DynamicFuture<<A as Environment>::Network>
Source§fn eject(&self) -> (Mode, Self::Primitive)
fn eject(&self) -> (Mode, Self::Primitive)
Source§fn is_constant(&self) -> bool
fn is_constant(&self) -> bool
true if the circuit is a constant.Source§fn is_private(&self) -> bool
fn is_private(&self) -> bool
true if the circuit is a private.Source§impl<A: Aleo> Equal for DynamicFuture<A>
impl<A: Aleo> Equal for DynamicFuture<A>
Source§impl<A: Aleo> From<DynamicFuture<A>> for Value<A>
impl<A: Aleo> From<DynamicFuture<A>> for Value<A>
Source§fn from(dynamic_future: DynamicFuture<A>) -> Self
fn from(dynamic_future: DynamicFuture<A>) -> Self
Initializes the value from a dynamic future.
Source§impl<A: Aleo> Inject for DynamicFuture<A>
impl<A: Aleo> Inject for DynamicFuture<A>
Source§impl<A: Aleo> ToBits for DynamicFuture<A>
impl<A: Aleo> ToBits for DynamicFuture<A>
Source§fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)
fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)
Returns the circuit dynamic future as a list of little-endian bits.
Source§fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)
fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)
Returns the circuit dynamic future as a list of big-endian bits.
type Boolean = Boolean<A>
Source§fn to_bits_le(&self) -> Vec<Self::Boolean>
fn to_bits_le(&self) -> Vec<Self::Boolean>
Source§fn to_bits_be(&self) -> Vec<Self::Boolean>
fn to_bits_be(&self) -> Vec<Self::Boolean>
Auto Trait Implementations§
impl<A> !Freeze for DynamicFuture<A>
impl<A> !RefUnwindSafe for DynamicFuture<A>
impl<A> Send for DynamicFuture<A>
impl<A> !Sync for DynamicFuture<A>
impl<A> Unpin for DynamicFuture<A>where
<A as Environment>::BaseField: Unpin,
<<A as Environment>::Network as Environment>::Projective: Unpin,
<A as Environment>::ScalarField: Unpin,
<A as Environment>::Network: Unpin,
impl<A> UnsafeUnpin for DynamicFuture<A>
impl<A> UnwindSafe for DynamicFuture<A>where
<A as Environment>::BaseField: UnwindSafe + RefUnwindSafe,
<<A as Environment>::Network as Environment>::Projective: UnwindSafe,
<A as Environment>::ScalarField: UnwindSafe,
<A as Environment>::Network: 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<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