pub struct Script(/* private fields */);
Implementations§
source§impl Script
impl Script
sourcepub fn calc_script_hash(&self) -> Byte32
pub fn calc_script_hash(&self) -> Byte32
Calls ScriptReader.calc_script_hash()
for self.as_reader()
.
source§impl Script
impl Script
sourcepub fn into_witness(self) -> Bytes
pub fn into_witness(self) -> Bytes
Converts self into bytes of CellbaseWitness
.
sourcepub fn from_witness(witness: Bytes) -> Option<Script>
pub fn from_witness(witness: Bytes) -> Option<Script>
Converts from bytes of CellbaseWitness
.
sourcepub fn is_hash_type_type(&self) -> bool
pub fn is_hash_type_type(&self) -> bool
source§impl Script
impl Script
pub const FIELD_COUNT: usize = 3usize
pub fn total_size(&self) -> usize
pub fn field_count(&self) -> usize
pub fn count_extra_fields(&self) -> usize
pub fn has_extra_fields(&self) -> bool
pub fn code_hash(&self) -> Byte32
pub fn hash_type(&self) -> Byte
pub fn args(&self) -> Bytes
pub fn as_reader<'r>(&'r self) -> ScriptReader<'r>
Trait Implementations§
source§impl Entity for Script
impl Entity for Script
type Builder = ScriptBuilder
const NAME: &'static str = "Script"
fn new_unchecked(data: Bytes) -> Script
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8] ⓘ
fn from_slice(slice: &[u8]) -> Result<Script, VerificationError>
fn from_compatible_slice(slice: &[u8]) -> Result<Script, VerificationError>
fn new_builder() -> <Script as Entity>::Builder
fn as_builder(self) -> <Script as Entity>::Builder
source§impl Ord for Script
impl Ord for Script
source§impl PartialEq for Script
impl PartialEq for Script
source§impl PartialOrd for Script
impl PartialOrd for Script
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 moreimpl Eq for Script
Auto Trait Implementations§
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