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
sourceimpl<'de, N: Network> Deserialize<'de> for ProgramID<N>
impl<'de, N: Network> Deserialize<'de> for ProgramID<N>
sourcefn 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.
sourceimpl<N: Network> From<(Identifier<N>, Identifier<N>)> for ProgramID<N>
impl<N: Network> From<(Identifier<N>, Identifier<N>)> for ProgramID<N>
sourcefn from((name, network): (Identifier<N>, Identifier<N>)) -> Self
fn from((name, network): (Identifier<N>, Identifier<N>)) -> Self
Initializes a program ID from a name and network-level domain identifier.
sourceimpl<N: Network> Ord for ProgramID<N>
impl<N: Network> Ord for ProgramID<N>
sourcefn 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 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<N: Network> Parser for ProgramID<N>
impl<N: Network> Parser for ProgramID<N>
sourcefn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into a program ID of the form {name}.{network}
.
sourceimpl<N: PartialEq + Network> PartialEq<ProgramID<N>> for ProgramID<N>
impl<N: PartialEq + Network> PartialEq<ProgramID<N>> for ProgramID<N>
sourceimpl<N: Network> PartialOrd<ProgramID<N>> for ProgramID<N>
impl<N: Network> PartialOrd<ProgramID<N>> for ProgramID<N>
sourcefn 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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl<N: Network> ToBits for &ProgramID<N>
impl<N: Network> ToBits for &ProgramID<N>
sourceimpl<N: Network> ToBits for ProgramID<N>
impl<N: Network> ToBits for ProgramID<N>
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
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.