Struct chain_impl_mockchain::transaction::Input
source · 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]) -> Self
pub fn value(&self) -> Value
pub fn get_type(&self) -> InputType
pub fn from_utxo(utxo_pointer: UtxoPointer) -> Self
pub fn from_utxo_entry(utxo_entry: Entry<'_, Address>) -> Self
pub fn from_account_public_key( public_key: SpendingPublicKey, value: Value ) -> Self
pub fn from_account(id: UnspecifiedAccountIdentifier, value: Value) -> Self
pub fn from_account_single(id: Identifier, value: Value) -> Self
pub fn from_multisig_account(id: Identifier, value: Value) -> Self
pub fn to_enum(&self) -> InputEnum
pub fn from_enum(ie: InputEnum) -> Input
Trait Implementations§
source§impl Deserialize for Input
impl Deserialize for Input
fn deserialize<R: Read>(codec: &mut Codec<R>) -> Result<Self, ReadError>
fn deserialize_validate<R>(codec: &mut Codec<R>) -> Result<(), ReadError>where R: Read,
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
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