Struct bitcoin::blockdata::script::Script
[−]
[src]
pub struct Script(_);
A Bitcoin script
Methods
impl Script
[src]
fn new() -> Script
Creates a new empty script
fn len(&self) -> usize
The length in bytes of the script
fn is_empty(&self) -> bool
Whether the script is the empty script
fn into_vec(self) -> Vec<u8>
Convert the script into a byte vector
fn is_p2sh(&self) -> bool
Checks whether a script pubkey is a p2sh output
fn is_provably_unspendable(&self) -> bool
Whether a script can be proven to have no satisfying input
Trait Implementations
impl Hash for Script
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl Eq for Script
[src]
impl PartialEq for Script
[src]
fn eq(&self, __arg_0: &Script) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Script) -> bool
This method tests for !=
.
impl Clone for Script
[src]
fn clone(&self) -> Script
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Script
[src]
impl Display for Script
[src]
impl LowerHex for Script
[src]
impl UpperHex for Script
[src]
impl Default for Script
[src]
impl From<Vec<u8>> for Script
[src]
Creates a new script from an existing vector
impl Index<Range<usize>> for Script
[src]
type Output = [u8]
The returned type after indexing
fn index(&self, index: Range<usize>) -> &[u8]
The method for the indexing (Foo[Bar]
) operation
impl Index<RangeTo<usize>> for Script
[src]
type Output = [u8]
The returned type after indexing
fn index(&self, index: RangeTo<usize>) -> &[u8]
The method for the indexing (Foo[Bar]
) operation
impl Index<RangeFrom<usize>> for Script
[src]
type Output = [u8]
The returned type after indexing
fn index(&self, index: RangeFrom<usize>) -> &[u8]
The method for the indexing (Foo[Bar]
) operation
impl Index<RangeFull> for Script
[src]
type Output = [u8]
The returned type after indexing
fn index(&self, _: RangeFull) -> &[u8]
The method for the indexing (Foo[Bar]
) operation
impl<'a> IntoIterator for &'a Script
[src]
type Item = Instruction<'a>
The type of the elements being iterated over.
type IntoIter = Instructions<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Instructions<'a>
Creates an iterator from a value. Read more
impl Serialize for Script
[src]
fn serialize<S>(&self, s: &mut S) -> Result<(), S::Error> where S: Serializer
Serializes this value into this serializer.
impl Deserialize for Script
[src]
fn deserialize<D>(d: &mut D) -> Result<Script, D::Error> where D: Deserializer
Deserialize this value given this Deserializer
.
impl<S: SimpleEncoder> ConsensusEncodable<S> for Script
[src]
fn consensus_encode(&self, s: &mut S) -> Result<(), S::Error>
Encode an object with a well-defined format
impl<D: SimpleDecoder> ConsensusDecodable<D> for Script
[src]
fn consensus_decode(d: &mut D) -> Result<Script, D::Error>
Decode an object with a well-defined format