Struct snarkvm_circuit::ProgramID
source · [−]pub struct ProgramID<A> where
A: Aleo, { /* private fields */ }
Expand description
A program ID is of the form {name}.{network}
.
If no network
-level domain is specified, the default network is used.
Implementations
sourceimpl<A> ProgramID<A> where
A: Aleo,
impl<A> ProgramID<A> where
A: Aleo,
sourcepub fn to_address(&self) -> Address<A>
pub fn to_address(&self) -> Address<A>
Returns the program address for this program ID.
sourceimpl<A> ProgramID<A> where
A: Aleo,
impl<A> ProgramID<A> where
A: Aleo,
sourcepub const fn name(&self) -> &Identifier<A>
pub const fn name(&self) -> &Identifier<A>
Returns the program name.
sourcepub const fn network(&self) -> &Identifier<A>
pub const fn network(&self) -> &Identifier<A>
Returns the network-level domain (NLD).
Trait Implementations
sourceimpl<A> Eject for ProgramID<A> where
A: Aleo,
impl<A> Eject for ProgramID<A> where
A: Aleo,
sourcefn eject_mode(&self) -> Mode
fn eject_mode(&self) -> Mode
Ejects the mode of the program ID.
sourcefn eject_value(&self) -> <ProgramID<A> as Eject>::Primitive
fn eject_value(&self) -> <ProgramID<A> as Eject>::Primitive
Ejects a program ID into a primitive.
type Primitive = ProgramID<<A as Environment>::Network>
sourcefn eject(&self) -> (Mode, Self::Primitive)
fn eject(&self) -> (Mode, Self::Primitive)
Ejects the mode and primitive value of the circuit type. Read more
sourcefn is_constant(&self) -> bool
fn is_constant(&self) -> bool
Returns true
if the circuit is a constant. Read more
sourcefn is_private(&self) -> bool
fn is_private(&self) -> bool
Returns true
if the circuit is a private. Read more
sourceimpl<A> ToBits for &ProgramID<A> where
A: Aleo,
impl<A> ToBits for &ProgramID<A> where
A: Aleo,
sourcefn to_bits_le(&self) -> Vec<<&ProgramID<A> as ToBits>::Boolean, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn to_bits_le(&self) -> Vec<<&ProgramID<A> as ToBits>::Boolean, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the little-endian bits of the program ID.
sourcefn to_bits_be(&self) -> Vec<<&ProgramID<A> as ToBits>::Boolean, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn to_bits_be(&self) -> Vec<<&ProgramID<A> as ToBits>::Boolean, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the big-endian bits of the program ID.
type Boolean = Boolean<A>
sourceimpl<A> ToBits for ProgramID<A> where
A: Aleo,
impl<A> ToBits for ProgramID<A> where
A: Aleo,
sourcefn to_bits_le(&self) -> Vec<<ProgramID<A> as ToBits>::Boolean, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn to_bits_le(&self) -> Vec<<ProgramID<A> as ToBits>::Boolean, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the little-endian bits of the program ID.
sourcefn to_bits_be(&self) -> Vec<<ProgramID<A> as ToBits>::Boolean, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn to_bits_be(&self) -> Vec<<ProgramID<A> as ToBits>::Boolean, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the big-endian bits of the program ID.
type Boolean = Boolean<A>
Auto Trait Implementations
impl<A> RefUnwindSafe for ProgramID<A> where
<A as Environment>::BaseField: UnwindSafe + RefUnwindSafe,
impl<A> !Send for ProgramID<A>
impl<A> !Sync for ProgramID<A>
impl<A> Unpin for ProgramID<A> where
<A as Environment>::BaseField: Unpin,
impl<A> UnwindSafe for ProgramID<A> where
<A as Environment>::BaseField: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more