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§
source§impl<N: Network> Locator<N>
impl<N: Network> Locator<N>
sourcepub const fn new(program_id: ProgramID<N>, resource: Identifier<N>) -> Self
pub const fn new(program_id: ProgramID<N>, resource: Identifier<N>) -> Self
Initializes a locator from a program ID and resource.
source§impl<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§
source§impl<'de, N: Network> Deserialize<'de> for Locator<N>
impl<'de, N: Network> Deserialize<'de> for Locator<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 locator from a string or bytes.
source§impl<N: Network> Parser for Locator<N>
impl<N: Network> Parser for Locator<N>
source§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into a locator of the form {program_id}/{resource}
.
source§impl<N: PartialEq + Network> PartialEq for Locator<N>
impl<N: PartialEq + Network> PartialEq for Locator<N>
impl<N: Copy + Network> Copy for Locator<N>
impl<N: Eq + Network> Eq for Locator<N>
impl<N: Network> StructuralPartialEq for Locator<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for Locator<N>
impl<N> Send for Locator<N>
impl<N> Sync for Locator<N>
impl<N> Unpin for Locator<N>
impl<N> UnwindSafe for Locator<N>
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 Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.