mod bytes;
mod parse;
mod serialize;
mod to_fields;
use crate::{Identifier, ProgramID};
use snarkvm_console_network::prelude::*;
use snarkvm_console_types::Field;
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
pub struct Locator<N: Network> {
id: ProgramID<N>,
resource: Identifier<N>,
}
impl<N: Network> Locator<N> {
pub const fn new(program_id: ProgramID<N>, resource: Identifier<N>) -> Self {
Self { id: program_id, resource }
}
}
impl<N: Network> Locator<N> {
#[inline]
pub const fn program_id(&self) -> &ProgramID<N> {
&self.id
}
#[inline]
pub const fn name(&self) -> &Identifier<N> {
self.id.name()
}
#[inline]
pub const fn network(&self) -> &Identifier<N> {
self.id.network()
}
#[inline]
pub const fn resource(&self) -> &Identifier<N> {
&self.resource
}
}