pub struct Script(pub Vec<u8>);Expand description
Represents a script.
Tuple Fields§
§0: Vec<u8>Implementations§
Source§impl Script
impl Script
Sourcepub fn len_varint(&self) -> VarInt
pub fn len_varint(&self) -> VarInt
Length of the script as VarInt.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Convert the script into the underlying bytes.
Sourcepub fn is_op_return(&self) -> bool
pub fn is_op_return(&self) -> bool
Checks whether the script fits the OP_RETURN pattern.
Trait Implementations§
Source§impl Encodable for Script
impl Encodable for Script
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message.
Source§fn encode_raw<B: BufMut>(&self, buf: &mut B)
fn encode_raw<B: BufMut>(&self, buf: &mut B)
Encodes structure to a buffer. This panics if buffer contains insufficient capacity.
impl Eq for Script
impl StructuralPartialEq for Script
Auto Trait Implementations§
impl Freeze for Script
impl RefUnwindSafe for Script
impl Send for Script
impl Sync for Script
impl Unpin for Script
impl UnwindSafe for Script
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