[−][src]Struct script::Builder
Script builder
Methods
impl Builder
[src]
[−]
impl Builder
pub fn build_p2pkh(address: &AddressHash) -> Script
[src]
[−]
pub fn build_p2pkh(address: &AddressHash) -> Script
Builds p2pkh script pubkey
pub fn build_p2sh(address: &AddressHash) -> Script
[src]
[−]
pub fn build_p2sh(address: &AddressHash) -> Script
Builds p2sh script pubkey
pub fn build_nulldata(bytes: &[u8]) -> Script
[src]
[−]
pub fn build_nulldata(bytes: &[u8]) -> Script
Builds op_return script
pub fn push_opcode(self, opcode: Opcode) -> Self
[src]
[−]
pub fn push_opcode(self, opcode: Opcode) -> Self
Pushes opcode to the end of script
pub fn push_bool(self, value: bool) -> Self
[src]
[−]
pub fn push_bool(self, value: bool) -> Self
Appends bool push operation to the end of script
pub fn push_num(self, num: Num) -> Self
[src]
[−]
pub fn push_num(self, num: Num) -> Self
Appends num push operation to the end of script
pub fn push_bytes(self, bytes: &[u8]) -> Self
[src]
[−]
pub fn push_bytes(self, bytes: &[u8]) -> Self
Appends bytes push operation to the end od script
pub fn push_data(self, data: &[u8]) -> Self
[src]
[−]
pub fn push_data(self, data: &[u8]) -> Self
Appends data push operation to the end of script
pub fn return_bytes(self, bytes: &[u8]) -> Self
[src]
[−]
pub fn return_bytes(self, bytes: &[u8]) -> Self
Appends OP_RETURN
operation to the end of script
pub fn push_invalid_opcode(self) -> Self
[src]
[−]
pub fn push_invalid_opcode(self) -> Self
Pushes invalid opcode to the end of script
pub fn into_script(self) -> Script
[src]
[−]
pub fn into_script(self) -> Script
Builds final script
ⓘImportant traits for Bytespub fn into_bytes(self) -> Bytes
[src]
[−]
pub fn into_bytes(self) -> Bytes
Builds final script bytes
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
[−]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
[−]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
[−]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
[−]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
[−]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
[−]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
[−]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
[−]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
[−]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
[−]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
[−]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
[−]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more