Struct scale_info::TypeDefBitSequence
source · [−]Expand description
Type describing a [bitvec::vec::BitVec].
Note
This can only be constructed for TypeInfo in the MetaForm with the bit-vec feature
enabled, but can be decoded or deserialized into the PortableForm without this feature.
Implementations
sourceimpl<T> TypeDefBitSequence<T>where
T: Form,
impl<T> TypeDefBitSequence<T>where
T: Form,
sourcepub fn bit_order_type(&self) -> &T::Type
pub fn bit_order_type(&self) -> &T::Type
Returns the type of the bit ordering of the [::bitvec::vec::BitVec].
sourcepub fn bit_store_type(&self) -> &T::Type
pub fn bit_store_type(&self) -> &T::Type
Returns underlying type used to store the [::bitvec::vec::BitVec].
sourceimpl TypeDefBitSequence
impl TypeDefBitSequence
sourcepub fn new<Store, Order>() -> Selfwhere
Store: TypeInfo + 'static,
Order: TypeInfo + 'static,
pub fn new<Store, Order>() -> Selfwhere
Store: TypeInfo + 'static,
Order: TypeInfo + 'static,
Creates a new TypeDefBitSequence for the supplied bit order and bit store types.
With the bit-vec feature enabled, the expected usage is to provide either
bitvec::order::Lsb0 or bitvec::order::Msb0 as the order type, and then something
like u8, u8, or u32 as the store type. Without the bit-vec feature enabled, it’s
recommended that your types have identical TypeInfo to those.
sourceimpl TypeDefBitSequence<PortableForm>
impl TypeDefBitSequence<PortableForm>
sourcepub fn new_portable(
bit_store_type: <PortableForm as Form>::Type,
bit_order_type: <PortableForm as Form>::Type
) -> Self
pub fn new_portable(
bit_store_type: <PortableForm as Form>::Type,
bit_order_type: <PortableForm as Form>::Type
) -> Self
Creates a new TypeDefBitSequence for the supplied bit order and bit store types.
Trait Implementations
sourceimpl<T: Clone + Form> Clone for TypeDefBitSequence<T>where
T::Type: Clone,
T::Type: Clone,
impl<T: Clone + Form> Clone for TypeDefBitSequence<T>where
T::Type: Clone,
T::Type: Clone,
sourcefn clone(&self) -> TypeDefBitSequence<T>
fn clone(&self) -> TypeDefBitSequence<T>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl<T: Form> Decode for TypeDefBitSequence<T>where
T::Type: Decode,
T::Type: Decode,
T::Type: Decode,
T::Type: Decode,
impl<T: Form> Decode for TypeDefBitSequence<T>where
T::Type: Decode,
T::Type: Decode,
T::Type: Decode,
T::Type: Decode,
sourcefn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
sourcefn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
sourcefn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
sourceimpl<T: Form> Encode for TypeDefBitSequence<T>where
T::Type: Encode,
T::Type: Encode,
T::Type: Encode,
T::Type: Encode,
impl<T: Form> Encode for TypeDefBitSequence<T>where
T::Type: Encode,
T::Type: Encode,
T::Type: Encode,
T::Type: Encode,
sourcefn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
sourcefn size_hint(&self) -> usize
fn size_hint(&self) -> usize
sourcefn encode(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn encode(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourcefn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
sourcefn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
sourceimpl<F: Form> From<TypeDefBitSequence<F>> for Type<F>
impl<F: Form> From<TypeDefBitSequence<F>> for Type<F>
sourcefn from(item: TypeDefBitSequence<F>) -> Self
fn from(item: TypeDefBitSequence<F>) -> Self
sourceimpl<F: Form> From<TypeDefBitSequence<F>> for TypeDef<F>
impl<F: Form> From<TypeDefBitSequence<F>> for TypeDef<F>
sourcefn from(x: TypeDefBitSequence<F>) -> Self
fn from(x: TypeDefBitSequence<F>) -> Self
sourceimpl IntoPortable for TypeDefBitSequence
impl IntoPortable for TypeDefBitSequence
type Output = TypeDefBitSequence<PortableForm>
type Output = TypeDefBitSequence<PortableForm>
Self.sourcefn into_portable(self, registry: &mut Registry) -> Self::Output
fn into_portable(self, registry: &mut Registry) -> Self::Output
self to the portable form by using the registry for caching.sourceimpl<T: Ord + Form> Ord for TypeDefBitSequence<T>where
T::Type: Ord,
T::Type: Ord,
impl<T: Ord + Form> Ord for TypeDefBitSequence<T>where
T::Type: Ord,
T::Type: Ord,
sourcefn cmp(&self, other: &TypeDefBitSequence<T>) -> Ordering
fn cmp(&self, other: &TypeDefBitSequence<T>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl<T: PartialEq + Form> PartialEq<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: PartialEq,
T::Type: PartialEq,
impl<T: PartialEq + Form> PartialEq<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: PartialEq,
T::Type: PartialEq,
sourcefn eq(&self, other: &TypeDefBitSequence<T>) -> bool
fn eq(&self, other: &TypeDefBitSequence<T>) -> bool
sourceimpl<T: PartialOrd + Form> PartialOrd<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: PartialOrd,
T::Type: PartialOrd,
impl<T: PartialOrd + Form> PartialOrd<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: PartialOrd,
T::Type: PartialOrd,
sourcefn partial_cmp(&self, other: &TypeDefBitSequence<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &TypeDefBitSequence<T>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more