pub struct Script(pub Vec<u8>);
Expand description
A serialized script, used inside transparent inputs and outputs of a transaction.
Tuple Fields§
§0: Vec<u8>
Implementations§
Source§impl Script
impl Script
pub fn read<R: Read>(reader: R) -> Result<Self>
pub fn write<W: Write>(&self, writer: W) -> Result<()>
Sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
Returns the length of this script as encoded (including the initial CompactSize).
Sourcepub fn address(&self) -> Option<TransparentAddress>
pub fn address(&self) -> Option<TransparentAddress>
Returns the address that this Script contains, if any.
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more