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§
source§impl<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
.
source§impl 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.
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>where
T::Type: Clone,
impl<T: Clone + Form> Clone for TypeDefBitSequence<T>where
T::Type: Clone,
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>where
T::Type: Decode,
impl<T: Form> Decode for TypeDefBitSequence<T>where
T::Type: Decode,
source§impl<'de, T: Form> Deserialize<'de> for TypeDefBitSequence<T>where
T::Type: Deserialize<'de>,
impl<'de, T: Form> Deserialize<'de> for TypeDefBitSequence<T>where
T::Type: Deserialize<'de>,
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>,
source§impl<T: Form> Encode for TypeDefBitSequence<T>where
T::Type: Encode,
impl<T: Form> Encode for TypeDefBitSequence<T>where
T::Type: Encode,
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 size_hint(&self) -> usize
fn size_hint(&self) -> usize
source§fn 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,
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
§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>where
T::Type: Ord,
impl<T: Ord + Form> Ord for TypeDefBitSequence<T>where
T::Type: Ord,
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: PartialEq + Form> PartialEq<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: PartialEq,
impl<T: PartialEq + Form> PartialEq<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: PartialEq,
source§fn eq(&self, other: &TypeDefBitSequence<T>) -> bool
fn eq(&self, other: &TypeDefBitSequence<T>) -> bool
source§impl<T: PartialOrd + Form> PartialOrd<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: PartialOrd,
impl<T: PartialOrd + Form> PartialOrd<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: PartialOrd,
source§fn partial_cmp(&self, other: &TypeDefBitSequence<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &TypeDefBitSequence<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl<T: Form> EncodeLike<TypeDefBitSequence<T>> for TypeDefBitSequence<T>where
T::Type: Encode,
impl<T: Eq + Form> Eq for TypeDefBitSequence<T>where
T::Type: Eq,
impl<T: Form> StructuralEq for TypeDefBitSequence<T>
impl<T: Form> StructuralPartialEq for TypeDefBitSequence<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for TypeDefBitSequence<T>where
<T as Form>::Type: RefUnwindSafe,
impl<T> Send for TypeDefBitSequence<T>where
<T as Form>::Type: Send,
impl<T> Sync for TypeDefBitSequence<T>where
<T as Form>::Type: Sync,
impl<T> Unpin for TypeDefBitSequence<T>where
<T as Form>::Type: Unpin,
impl<T> UnwindSafe for TypeDefBitSequence<T>where
<T as Form>::Type: UnwindSafe,
Blanket Implementations§
source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds. Read moresource§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds. Read moresource§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read moresource§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds. Read moresource§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds. Read more