Struct bc::ScriptBytes
source · pub struct ScriptBytes(_);Implementations§
source§impl ScriptBytes
impl ScriptBytes
sourcepub fn push_slice(&mut self, data: &[u8])
pub fn push_slice(&mut self, data: &[u8])
Adds instructions to push some arbitrary data onto the stack.
Panics
The method panics if data length is greater or equal to
0x100000000.
sourcepub fn len_for_slice(len: usize) -> usize
pub fn len_for_slice(len: usize) -> usize
Computes the sum of len and the lenght of an appropriate push
opcode.
Trait Implementations§
source§impl AsMut<<ScriptBytes as Wrapper>::Inner> for ScriptBytes
impl AsMut<<ScriptBytes as Wrapper>::Inner> for ScriptBytes
source§impl AsRef<<ScriptBytes as Wrapper>::Inner> for ScriptBytes
impl AsRef<<ScriptBytes as Wrapper>::Inner> for ScriptBytes
source§impl Borrow<<ScriptBytes as Wrapper>::Inner> for ScriptBytes
impl Borrow<<ScriptBytes as Wrapper>::Inner> for ScriptBytes
source§impl Borrow<[u8]> for ScriptBytes
impl Borrow<[u8]> for ScriptBytes
source§impl BorrowMut<<ScriptBytes as Wrapper>::Inner> for ScriptBytes
impl BorrowMut<<ScriptBytes as Wrapper>::Inner> for ScriptBytes
source§impl BorrowMut<[u8]> for ScriptBytes
impl BorrowMut<[u8]> for ScriptBytes
source§impl Clone for ScriptBytes
impl Clone for ScriptBytes
source§fn clone(&self) -> ScriptBytes
fn clone(&self) -> ScriptBytes
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ScriptBytes
impl Debug for ScriptBytes
source§impl Default for ScriptBytes
impl Default for ScriptBytes
source§fn default() -> ScriptBytes
fn default() -> ScriptBytes
Returns the “default value” for a type. Read more
source§impl Deref for ScriptBytes
impl Deref for ScriptBytes
source§impl DerefMut for ScriptBytes
impl DerefMut for ScriptBytes
source§impl<'de> Deserialize<'de> for ScriptBytes
impl<'de> Deserialize<'de> for ScriptBytes
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Confined<Vec<u8, Global>, 0, U32>> for ScriptBytes
impl From<Confined<Vec<u8, Global>, 0, U32>> for ScriptBytes
source§fn from(v: VarIntArray<u8>) -> Self
fn from(v: VarIntArray<u8>) -> Self
Converts to this type from the input type.
source§impl From<ScriptBytes> for ScriptPubkey
impl From<ScriptBytes> for ScriptPubkey
source§fn from(v: ScriptBytes) -> Self
fn from(v: ScriptBytes) -> Self
Converts to this type from the input type.
source§impl From<ScriptBytes> for SigScript
impl From<ScriptBytes> for SigScript
source§fn from(v: ScriptBytes) -> Self
fn from(v: ScriptBytes) -> Self
Converts to this type from the input type.
source§impl From<ScriptBytes> for TapScript
impl From<ScriptBytes> for TapScript
source§fn from(v: ScriptBytes) -> Self
fn from(v: ScriptBytes) -> Self
Converts to this type from the input type.
source§impl From<ScriptBytes> for VarIntArray<u8>
impl From<ScriptBytes> for VarIntArray<u8>
source§fn from(wrapped: ScriptBytes) -> Self
fn from(wrapped: ScriptBytes) -> Self
Converts to this type from the input type.
source§impl From<ScriptPubkey> for ScriptBytes
impl From<ScriptPubkey> for ScriptBytes
source§fn from(wrapped: ScriptPubkey) -> Self
fn from(wrapped: ScriptPubkey) -> Self
Converts to this type from the input type.
source§impl From<SigScript> for ScriptBytes
impl From<SigScript> for ScriptBytes
source§impl From<TapScript> for ScriptBytes
impl From<TapScript> for ScriptBytes
source§impl Hash for ScriptBytes
impl Hash for ScriptBytes
source§impl Index<RangeFull> for ScriptBytes
impl Index<RangeFull> for ScriptBytes
source§impl Index<RangeInclusive<usize>> for ScriptBytes
impl Index<RangeInclusive<usize>> for ScriptBytes
source§impl Index<RangeToInclusive<usize>> for ScriptBytes
impl Index<RangeToInclusive<usize>> for ScriptBytes
source§impl Index<usize> for ScriptBytes
impl Index<usize> for ScriptBytes
source§impl IndexMut<RangeFull> for ScriptBytes
impl IndexMut<RangeFull> for ScriptBytes
source§impl IndexMut<RangeInclusive<usize>> for ScriptBytes
impl IndexMut<RangeInclusive<usize>> for ScriptBytes
source§impl IndexMut<RangeToInclusive<usize>> for ScriptBytes
impl IndexMut<RangeToInclusive<usize>> for ScriptBytes
source§impl IndexMut<usize> for ScriptBytes
impl IndexMut<usize> for ScriptBytes
source§impl LowerHex for ScriptBytes
impl LowerHex for ScriptBytes
source§impl Ord for ScriptBytes
impl Ord for ScriptBytes
source§fn cmp(&self, other: &ScriptBytes) -> Ordering
fn cmp(&self, other: &ScriptBytes) -> Ordering
1.21.0 · 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 PartialEq<ScriptBytes> for ScriptBytes
impl PartialEq<ScriptBytes> for ScriptBytes
source§fn eq(&self, other: &ScriptBytes) -> bool
fn eq(&self, other: &ScriptBytes) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<ScriptBytes> for ScriptBytes
impl PartialOrd<ScriptBytes> for ScriptBytes
source§fn partial_cmp(&self, other: &ScriptBytes) -> Option<Ordering>
fn partial_cmp(&self, other: &ScriptBytes) -> Option<Ordering>
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 ScriptBytes
impl Serialize for ScriptBytes
source§impl StrictDecode for ScriptBytes
impl StrictDecode for ScriptBytes
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictEncode for ScriptBytes
impl StrictEncode for ScriptBytes
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
source§impl StrictTuple for ScriptBytes
impl StrictTuple for ScriptBytes
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for ScriptBytes
impl StrictType for ScriptBytes
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
source§impl UpperHex for ScriptBytes
impl UpperHex for ScriptBytes
source§impl Wrapper for ScriptBytes
impl Wrapper for ScriptBytes
source§impl WrapperMut for ScriptBytes
impl WrapperMut for ScriptBytes
source§fn as_inner_mut(&mut self) -> &mut <Self as Wrapper>::Inner
fn as_inner_mut(&mut self) -> &mut <Self as Wrapper>::Inner
Returns a mutable reference to the inner representation for the wrapper
type
impl Eq for ScriptBytes
impl StrictProduct for ScriptBytes
impl StructuralEq for ScriptBytes
impl StructuralPartialEq for ScriptBytes
Auto Trait Implementations§
impl RefUnwindSafe for ScriptBytes
impl Send for ScriptBytes
impl Sync for ScriptBytes
impl Unpin for ScriptBytes
impl UnwindSafe for ScriptBytes
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
§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.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.