pub struct Witness(/* private fields */);
Implementations§
Methods from Deref<Target = VarIntArray<VarIntArray<u8>>>§
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 AsRef<Confined<Vec<Confined<Vec<u8>, 0, U32>>, 0, U32>> for Witness
impl AsRef<Confined<Vec<Confined<Vec<u8>, 0, U32>>, 0, U32>> for Witness
source§fn as_ref(&self) -> &VarIntArray<VarIntArray<u8>>
fn as_ref(&self) -> &VarIntArray<VarIntArray<u8>>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<Confined<Vec<Confined<Vec<u8>, 0, U32>>, 0, U32>> for Witness
impl Borrow<Confined<Vec<Confined<Vec<u8>, 0, U32>>, 0, U32>> for Witness
source§fn borrow(&self) -> &VarIntArray<VarIntArray<u8>>
fn borrow(&self) -> &VarIntArray<VarIntArray<u8>>
Immutably borrows from an owned value. Read more
source§impl ConsensusDecode for Witness
impl ConsensusDecode for Witness
fn consensus_decode( reader: &mut impl Read ) -> Result<Self, 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<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Confined<Vec<Confined<Vec<u8>, 0, U32>>, 0, U32>> for Witness
impl From<Confined<Vec<Confined<Vec<u8>, 0, U32>>, 0, U32>> for Witness
source§fn from(v: VarIntArray<VarIntArray<u8>>) -> Self
fn from(v: VarIntArray<VarIntArray<u8>>) -> Self
Converts to this type from the input type.
source§impl From<Witness> for VarIntArray<VarIntArray<u8>>
impl From<Witness> for VarIntArray<VarIntArray<u8>>
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<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictEncode for Witness
impl StrictEncode for Witness
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, 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
§type Inner = Confined<Vec<Confined<Vec<u8>, 0, U32>>, 0, U32>
type Inner = Confined<Vec<Confined<Vec<u8>, 0, U32>>, 0, U32>
Inner type wrapped by the current newtype
source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner 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 Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.