pub struct Witness(/* private fields */);
Implementations§
Methods from Deref<Target = Confined<Vec<ByteStr>, 0, bc::::coding::VarIntArray::{constant#1}>>§
sourcepub fn len_u8(&self) -> u8
pub fn len_u8(&self) -> u8
Returns number of elements in the confined collection as u8
. The
confinement guarantees that the collection length can’t exceed
u8::MAX
.
sourcepub fn len_u16(&self) -> u16
pub fn len_u16(&self) -> u16
Returns number of elements in the confined collection as u16
. The
confinement guarantees that the collection length can’t exceed
u16::MAX
.
sourcepub fn len_u24(&self) -> u24
pub fn len_u24(&self) -> u24
Returns number of elements in the confined collection as u24
. The
confinement guarantees that the collection length can’t exceed
u24::MAX
.
Trait Implementations§
source§impl ConsensusDecode for Witness
impl ConsensusDecode for Witness
fn consensus_decode( reader: &mut impl Read ) -> Result<Witness, ConsensusDecodeError>
fn consensus_deserialize( bytes: impl AsRef<[u8]> ) -> Result<Self, ConsensusDecodeError>
source§impl ConsensusEncode for Witness
impl ConsensusEncode for Witness
source§impl Index<RangeFrom<usize>> for Witness
impl Index<RangeFrom<usize>> for Witness
source§impl Index<RangeInclusive<usize>> for Witness
impl Index<RangeInclusive<usize>> for Witness
source§impl Index<RangeTo<usize>> for Witness
impl Index<RangeTo<usize>> for Witness
source§impl Index<RangeToInclusive<usize>> for Witness
impl Index<RangeToInclusive<usize>> for Witness
source§impl IntoIterator for Witness
impl IntoIterator for Witness
source§impl PartialEq for Witness
impl PartialEq for Witness
source§impl StrictDecode for Witness
impl StrictDecode for Witness
fn strict_decode(reader: &mut impl TypedRead) -> Result<Witness, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictType for Witness
impl StrictType for Witness
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
source§impl Weight for Witness
impl Weight for Witness
fn weight_units(&self) -> WeightUnits
fn vbytes(&self) -> VBytes
source§impl Wrapper for Witness
impl Wrapper for Witness
§type Inner = Confined<Vec<ByteStr>, 0, bc::::coding::VarIntArray::{constant#1}>
type Inner = Confined<Vec<ByteStr>, 0, bc::::coding::VarIntArray::{constant#1}>
Inner type wrapped by the current newtype
source§fn from_inner(inner: <Witness as Wrapper>::Inner) -> Witness
fn from_inner(inner: <Witness as Wrapper>::Inner) -> Witness
Instantiates wrapper type with the inner data
source§fn as_inner(&self) -> &<Witness as Wrapper>::Inner
fn as_inner(&self) -> &<Witness as Wrapper>::Inner
Returns reference to the inner representation for the wrapper type
impl Eq for Witness
impl StrictProduct for Witness
impl StructuralEq for Witness
impl StructuralPartialEq for Witness
Auto Trait Implementations§
impl RefUnwindSafe for Witness
impl Send for Witness
impl Sync for Witness
impl Unpin for Witness
impl UnwindSafe for Witness
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.