Struct snarkvm_console_program::Locator
source · [−]pub struct Locator<N: Network> { /* private fields */ }
Expand description
A locator is of the form {program_id}/{resource}
(i.e. howard.aleo/notify
).
Implementations
sourceimpl<N: Network> Locator<N>
impl<N: Network> Locator<N>
sourcepub const fn program_id(&self) -> &ProgramID<N>
pub const fn program_id(&self) -> &ProgramID<N>
Returns the program ID.
sourcepub const fn name(&self) -> &Identifier<N>
pub const fn name(&self) -> &Identifier<N>
Returns the program name.
sourcepub const fn network(&self) -> &Identifier<N>
pub const fn network(&self) -> &Identifier<N>
Returns the network-level domain (NLD).
sourcepub const fn resource(&self) -> &Identifier<N>
pub const fn resource(&self) -> &Identifier<N>
Returns the resource name.
Trait Implementations
sourceimpl<'de, N: Network> Deserialize<'de> for Locator<N>
impl<'de, N: Network> Deserialize<'de> for Locator<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 locator from a string or bytes.
sourceimpl<N: Network> Parser for Locator<N>
impl<N: Network> Parser for Locator<N>
sourcefn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into a locator of the form {program_id}/{resource}
.
sourceimpl<N: PartialEq + Network> PartialEq<Locator<N>> for Locator<N>
impl<N: PartialEq + Network> PartialEq<Locator<N>> for Locator<N>
impl<N: Copy + Network> Copy for Locator<N>
impl<N: Eq + Network> Eq for Locator<N>
impl<N: Network> StructuralEq for Locator<N>
impl<N: Network> StructuralPartialEq for Locator<N>
Auto Trait Implementations
impl<N> RefUnwindSafe for Locator<N> where
<N as Environment>::Field: RefUnwindSafe,
impl<N> Send for Locator<N>
impl<N> Sync for Locator<N>
impl<N> Unpin for Locator<N> where
<N as Environment>::Field: Unpin,
impl<N> UnwindSafe for Locator<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.