mod bytes;
mod parse;
use console::{
network::prelude::*,
program::{FinalizeType, Identifier},
};
#[derive(Clone, PartialEq, Eq, Hash)]
pub struct MapValue<N: Network> {
name: Identifier<N>,
finalize_type: FinalizeType<N>,
}
impl<N: Network> MapValue<N> {
#[inline]
pub const fn name(&self) -> &Identifier<N> {
&self.name
}
#[inline]
pub const fn finalize_type(&self) -> &FinalizeType<N> {
&self.finalize_type
}
}
impl<N: Network> TypeName for MapValue<N> {
#[inline]
fn type_name() -> &'static str {
"value"
}
}
#[cfg(test)]
mod tests {
use super::*;
use console::network::Testnet3;
type CurrentNetwork = Testnet3;
#[test]
fn test_value_type_name() {
assert_eq!(MapValue::<CurrentNetwork>::type_name(), "value");
}
}