Struct snarkvm_console_program::ProgramID
source · pub struct ProgramID<N: Network> { /* private fields */ }
Expand description
A program ID is of the form {name}.{network}
.
Implementations§
Trait Implementations§
source§impl<'de, N: Network> Deserialize<'de> for ProgramID<N>
impl<'de, N: Network> Deserialize<'de> for ProgramID<N>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the program ID from a string or bytes.
source§impl<N: Network> Ord for ProgramID<N>
impl<N: Network> Ord for ProgramID<N>
source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Ordering is determined by the network first, then the program name second.
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<N: Network> Parser for ProgramID<N>
impl<N: Network> Parser for ProgramID<N>
source§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into a program ID of the form {name}.{network}
.
source§impl<N: PartialEq + Network> PartialEq<ProgramID<N>> for ProgramID<N>
impl<N: PartialEq + Network> PartialEq<ProgramID<N>> for ProgramID<N>
source§impl<N: Network> PartialOrd<ProgramID<N>> for ProgramID<N>
impl<N: Network> PartialOrd<ProgramID<N>> for ProgramID<N>
source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Ordering is determined by the network first, then the program name second.
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<N: Network> ToBits for &ProgramID<N>
impl<N: Network> ToBits for &ProgramID<N>
source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns the little-endian bits of the program ID.
source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns the big-endian bits of the program ID.
source§impl<N: Network> ToBits for ProgramID<N>
impl<N: Network> ToBits for ProgramID<N>
source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns the little-endian bits of the program ID.
source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns the big-endian bits of the program ID.
source§impl<N: Network> TryFrom<(Identifier<N>, Identifier<N>)> for ProgramID<N>
impl<N: Network> TryFrom<(Identifier<N>, Identifier<N>)> for ProgramID<N>
source§fn try_from((name, network): (Identifier<N>, Identifier<N>)) -> Result<Self>
fn try_from((name, network): (Identifier<N>, Identifier<N>)) -> Result<Self>
Initializes a program ID from a name and network-level domain identifier.
impl<N: Copy + Network> Copy for ProgramID<N>
impl<N: Eq + Network> Eq for ProgramID<N>
impl<N: Network> StructuralEq for ProgramID<N>
impl<N: Network> StructuralPartialEq for ProgramID<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for ProgramID<N>where <N as Environment>::Field: RefUnwindSafe,
impl<N> Send for ProgramID<N>
impl<N> Sync for ProgramID<N>
impl<N> Unpin for ProgramID<N>where <N as Environment>::Field: Unpin,
impl<N> UnwindSafe for ProgramID<N>where <N as Environment>::Field: 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
Mutably borrows from an owned value. Read more
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>,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key
and return true
if they are equal.