pub struct Input<N: Network> { /* private fields */ }Expand description
An input statement defines an input argument to a view function, of the form
input {register} as {finalize_type};.
View inputs reuse the finalize input shape because view bodies share the finalize command set and therefore the same plaintext-only register model.
Implementations§
Source§impl<N: Network> Input<N>
impl<N: Network> Input<N>
Sourcepub const fn finalize_type(&self) -> &FinalizeType<N>
pub const fn finalize_type(&self) -> &FinalizeType<N>
Returns the input finalize type.
Trait Implementations§
Source§impl<N: Network> FromBytes for Input<N>
impl<N: Network> FromBytes for Input<N>
Source§fn read_le<R: Read>(reader: R) -> IoResult<Self>
fn read_le<R: Read>(reader: R) -> IoResult<Self>
Reads
Self from reader as little-endian bytes.Source§fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Returns
Self from a byte array in little-endian order.Source§fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Same behavior as
Self::from_bytes_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
Same behavior as
Self::read_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§impl<N: Network> Ord for Input<N>
impl<N: Network> Ord for Input<N>
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Ordering is determined by the register (the finalize type is ignored).
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<N: Network> Parser for Input<N>
impl<N: Network> Parser for Input<N>
Source§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into an input statement.
The input statement is of the form input {register} as {plaintext_type}.public;.
Source§impl<N: Network> PartialOrd for Input<N>
impl<N: Network> PartialOrd for Input<N>
Source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Ordering is determined by the register (the finalize type is ignored).
impl<N: Eq + Network> Eq for Input<N>
impl<N: Network> StructuralPartialEq for Input<N>
Auto Trait Implementations§
impl<N> Freeze for Input<N>
impl<N> RefUnwindSafe for Input<N>
impl<N> Send for Input<N>
impl<N> Sync for Input<N>
impl<N> Unpin for Input<N>
impl<N> UnsafeUnpin for Input<N>
impl<N> UnwindSafe for Input<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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more