pub struct TypeDefBitSequence<T: Form = MetaForm> {
pub bit_store_type: T::Type,
pub bit_order_type: T::Type,
}
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.
Fields§
§bit_store_type: T::Type
The type implementing [bitvec::store::BitStore
].
bit_order_type: T::Type
The type implementing [bitvec::order::BitOrder
].
Implementations§
source§impl<T> TypeDefBitSequence<T>where
T: Form,
impl<T> TypeDefBitSequence<T>where
T: Form,
sourcepub fn bit_order_type(&self) -> &T::Type
👎Deprecated since 2.5.0: Prefer to access the fields directly; this getter will be removed in the next major version
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
👎Deprecated since 2.5.0: Prefer to access the fields directly; this getter will be removed in the next major version
pub fn bit_store_type(&self) -> &T::Type
Returns underlying type used to store the [::bitvec::vec::BitVec
].
source§impl TypeDefBitSequence
impl TypeDefBitSequence
sourcepub fn new<Store, Order>() -> Self
pub fn new<Store, Order>() -> Self
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.
source§impl 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§
source§impl<T: Clone + Form> Clone for TypeDefBitSequence<T>
impl<T: Clone + Form> Clone for TypeDefBitSequence<T>
source§fn clone(&self) -> TypeDefBitSequence<T>
fn clone(&self) -> TypeDefBitSequence<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: Form> Decode for TypeDefBitSequence<T>
impl<T: Form> Decode for TypeDefBitSequence<T>
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
source§impl<T: Form> Encode for TypeDefBitSequence<T>
impl<T: Form> Encode for TypeDefBitSequence<T>
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
source§impl<F: Form> From<TypeDefBitSequence<F>> for Type<F>
impl<F: Form> From<TypeDefBitSequence<F>> for Type<F>
source§fn from(item: TypeDefBitSequence<F>) -> Self
fn from(item: TypeDefBitSequence<F>) -> Self
source§impl<F: Form> From<TypeDefBitSequence<F>> for TypeDef<F>
impl<F: Form> From<TypeDefBitSequence<F>> for TypeDef<F>
source§fn from(x: TypeDefBitSequence<F>) -> Self
fn from(x: TypeDefBitSequence<F>) -> Self
source§impl IntoPortable for TypeDefBitSequence
impl IntoPortable for TypeDefBitSequence
source§type Output = TypeDefBitSequence<PortableForm>
type Output = TypeDefBitSequence<PortableForm>
Self
.source§fn 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.source§impl<T: Ord + Form> Ord for TypeDefBitSequence<T>
impl<T: Ord + Form> Ord for TypeDefBitSequence<T>
source§fn cmp(&self, other: &TypeDefBitSequence<T>) -> Ordering
fn cmp(&self, other: &TypeDefBitSequence<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<T: PartialOrd + Form> PartialOrd for TypeDefBitSequence<T>where
T::Type: PartialOrd,
impl<T: PartialOrd + Form> PartialOrd for TypeDefBitSequence<T>where
T::Type: PartialOrd,
impl<T: Form> EncodeLike for TypeDefBitSequence<T>
impl<T: Eq + Form> Eq for TypeDefBitSequence<T>
impl<T: Form> StructuralPartialEq for TypeDefBitSequence<T>
Auto Trait Implementations§
impl<T> Freeze for TypeDefBitSequence<T>
impl<T> RefUnwindSafe for TypeDefBitSequence<T>
impl<T> Send for TypeDefBitSequence<T>
impl<T> Sync for TypeDefBitSequence<T>
impl<T> Unpin for TypeDefBitSequence<T>
impl<T> UnwindSafe for TypeDefBitSequence<T>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)