pub struct Witness(/* private fields */);
Implementations§
Methods from Deref<Target = Confined<Vec<ByteStr>, 0, bc::::coding::VarIntArray::{constant#1}>>§
Sourcepub fn as_inner(&self) -> &C
👎Deprecated since 4.7.0: use as_unconfined method
pub fn as_inner(&self) -> &C
Returns inner collection type
Sourcepub fn as_unconfined(&self) -> &C
pub fn as_unconfined(&self) -> &C
Returns reference to the inner collection type.
Sourcepub fn to_inner(&self) -> Cwhere
C: Clone,
👎Deprecated since 4.7.0: use to_unconfined method
pub fn to_inner(&self) -> Cwhere
C: Clone,
Clones inner collection type and returns it
Sourcepub fn to_unconfined(&self) -> Cwhere
C: Clone,
pub fn to_unconfined(&self) -> Cwhere
C: Clone,
Clones inner collection and returns an unconfined version of it.
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<'de> Deserialize<'de> for Witness
impl<'de> Deserialize<'de> for Witness
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Witness, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Witness, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Index<Range<usize>> for Witness
impl Index<Range<usize>> 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 Serialize for Witness
impl Serialize for Witness
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for Witness
impl StrictDecode for Witness
fn strict_decode(reader: &mut impl TypedRead) -> Result<Witness, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictEncode for Witness
impl StrictEncode for Witness
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictTuple for Witness
impl StrictTuple for Witness
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
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
Source§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
Source§fn into_inner(self) -> <Witness as Wrapper>::Inner
fn into_inner(self) -> <Witness as Wrapper>::Inner
Unwraps the wrapper returning the inner type
impl Eq for Witness
impl StrictProduct for Witness
impl StructuralPartialEq for Witness
Auto Trait Implementations§
impl Freeze for Witness
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.