pub struct Input {
index_or_account: u8,
value: Value,
input_ptr: [u8; 32],
}
Expand description
Generalized input which have a specific input value, and either contains an account reference or a TransactionSignDataHash+index
This uniquely refer to a specific source of value.
Fields§
§index_or_account: u8
§value: Value
§input_ptr: [u8; 32]
Implementations§
source§impl Input
impl Input
pub fn bytes(&self) -> [u8; 41]
pub fn new(index_or_account: u8, value: Value, input_ptr: [u8; 32]) -> Input
pub fn value(&self) -> Value
pub fn get_type(&self) -> InputType
pub fn from_utxo(utxo_pointer: UtxoPointer) -> Input
pub fn from_utxo_entry(utxo_entry: Entry<'_, Address>) -> Input
pub fn from_account_public_key( public_key: PublicKey<Ed25519>, value: Value ) -> Input
pub fn from_account(id: UnspecifiedAccountIdentifier, value: Value) -> Input
pub fn from_account_single(id: Identifier, value: Value) -> Input
pub fn from_multisig_account(id: Identifier, value: Value) -> Input
pub fn to_enum(&self) -> InputEnum
pub fn from_enum(ie: InputEnum) -> Input
Trait Implementations§
source§impl Deserialize for Input
impl Deserialize for Input
source§impl From<TransactionInput> for Input
impl From<TransactionInput> for Input
source§fn from(i: TransactionInput) -> Input
fn from(i: TransactionInput) -> Input
Converts to this type from the input type.
source§impl Ord for Input
impl Ord for Input
source§impl PartialEq<Input> for Input
impl PartialEq<Input> for Input
source§impl PartialOrd<Input> for Input
impl PartialOrd<Input> for Input
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for Input
impl Serialize for Input
source§fn serialized_size(&self) -> usize
fn serialized_size(&self) -> usize
Default implementation, not efficient, not recommended to use it
fn serialize<W>(&self, codec: &mut Codec<W>) -> Result<(), WriteError>where W: Write,
source§fn serialize_as_vec(&self) -> Result<Vec<u8, Global>, WriteError>
fn serialize_as_vec(&self) -> Result<Vec<u8, Global>, WriteError>
Convenience method to serialize into a byte vector.
impl Eq for Input
impl StructuralEq for Input
impl StructuralPartialEq for Input
Auto Trait Implementations§
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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> DeserializeFromSlice for Twhere
T: Deserialize,
impl<T> DeserializeFromSlice for Twhere T: Deserialize,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request