mod bytes;
mod parse;
use console::{
network::prelude::*,
program::{FinalizeType, Register},
};
#[derive(Clone, PartialEq, Eq, Hash)]
pub struct Input<N: Network> {
register: Register<N>,
finalize_type: FinalizeType<N>,
}
impl<N: Network> Input<N> {
#[inline]
pub const fn register(&self) -> &Register<N> {
&self.register
}
#[inline]
pub const fn finalize_type(&self) -> &FinalizeType<N> {
&self.finalize_type
}
}
impl<N: Network> TypeName for Input<N> {
#[inline]
fn type_name() -> &'static str {
"input"
}
}
impl<N: Network> Ord for Input<N> {
fn cmp(&self, other: &Self) -> Ordering {
self.register().cmp(other.register())
}
}
impl<N: Network> PartialOrd for Input<N> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}