Struct bitcoin::blockdata::script::PushBytesBuf
source · pub struct PushBytesBuf(/* private fields */);
Expand description
Owned, growable counterpart to PushBytes
.
Implementations§
source§impl PushBytesBuf
impl PushBytesBuf
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new empty PushBytesBuf
with reserved capacity.
sourcepub fn reserve(&mut self, additional_capacity: usize)
pub fn reserve(&mut self, additional_capacity: usize)
Reserve capacity for additional_capacity
bytes.
sourcepub fn extend_from_slice(&mut self, bytes: &[u8]) -> Result<(), PushBytesError>
pub fn extend_from_slice(&mut self, bytes: &[u8]) -> Result<(), PushBytesError>
sourcepub fn as_push_bytes(&self) -> &PushBytes
pub fn as_push_bytes(&self) -> &PushBytes
Extracts PushBytes
slice
sourcepub fn as_mut_push_bytes(&mut self) -> &mut PushBytes
pub fn as_mut_push_bytes(&mut self) -> &mut PushBytes
Extracts mutable PushBytes
slice
Methods from Deref<Target = PushBytes>§
sourcepub fn as_mut_bytes(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_bytes(&mut self) -> &mut [u8] ⓘ
Returns the underlying mutbale bytes.
Trait Implementations§
source§impl AsMut<PushBytes> for PushBytesBuf
impl AsMut<PushBytes> for PushBytesBuf
source§impl AsRef<PushBytes> for PushBytesBuf
impl AsRef<PushBytes> for PushBytesBuf
source§impl Borrow<PushBytes> for PushBytesBuf
impl Borrow<PushBytes> for PushBytesBuf
source§impl BorrowMut<PushBytes> for PushBytesBuf
impl BorrowMut<PushBytes> for PushBytesBuf
source§fn borrow_mut(&mut self) -> &mut PushBytes
fn borrow_mut(&mut self) -> &mut PushBytes
Mutably borrows from an owned value. Read more
source§impl Clone for PushBytesBuf
impl Clone for PushBytesBuf
source§fn clone(&self) -> PushBytesBuf
fn clone(&self) -> PushBytesBuf
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 PushBytesBuf
impl Debug for PushBytesBuf
source§impl Default for PushBytesBuf
impl Default for PushBytesBuf
source§fn default() -> PushBytesBuf
fn default() -> PushBytesBuf
Returns the “default value” for a type. Read more
source§impl Deref for PushBytesBuf
impl Deref for PushBytesBuf
source§impl DerefMut for PushBytesBuf
impl DerefMut for PushBytesBuf
source§impl From<PubkeyHash> for PushBytesBuf
impl From<PubkeyHash> for PushBytesBuf
source§fn from(hash: PubkeyHash) -> Self
fn from(hash: PubkeyHash) -> Self
Converts to this type from the input type.
source§impl From<PushBytesBuf> for Vec<u8>
impl From<PushBytesBuf> for Vec<u8>
source§fn from(value: PushBytesBuf) -> Self
fn from(value: PushBytesBuf) -> Self
Converts to this type from the input type.
source§impl From<ScriptHash> for PushBytesBuf
impl From<ScriptHash> for PushBytesBuf
source§fn from(hash: ScriptHash) -> Self
fn from(hash: ScriptHash) -> Self
Converts to this type from the input type.
source§impl From<WPubkeyHash> for PushBytesBuf
impl From<WPubkeyHash> for PushBytesBuf
source§fn from(hash: WPubkeyHash) -> Self
fn from(hash: WPubkeyHash) -> Self
Converts to this type from the input type.
source§impl From<WScriptHash> for PushBytesBuf
impl From<WScriptHash> for PushBytesBuf
source§fn from(hash: WScriptHash) -> Self
fn from(hash: WScriptHash) -> Self
Converts to this type from the input type.
source§impl Hash for PushBytesBuf
impl Hash for PushBytesBuf
source§impl Ord for PushBytesBuf
impl Ord for PushBytesBuf
source§fn cmp(&self, other: &PushBytesBuf) -> Ordering
fn cmp(&self, other: &PushBytesBuf) -> 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<PushBytesBuf> for PushBytesBuf
impl PartialEq<PushBytesBuf> for PushBytesBuf
source§fn eq(&self, other: &PushBytesBuf) -> bool
fn eq(&self, other: &PushBytesBuf) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PushBytesBuf> for PushBytesBuf
impl PartialOrd<PushBytesBuf> for PushBytesBuf
source§fn partial_cmp(&self, other: &PushBytesBuf) -> Option<Ordering>
fn partial_cmp(&self, other: &PushBytesBuf) -> 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 moreimpl Eq for PushBytesBuf
impl StructuralEq for PushBytesBuf
impl StructuralPartialEq for PushBytesBuf
Auto Trait Implementations§
impl RefUnwindSafe for PushBytesBuf
impl Send for PushBytesBuf
impl Sync for PushBytesBuf
impl Unpin for PushBytesBuf
impl UnwindSafe for PushBytesBuf
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