### Example Searches Source: https://docs.rs/bitpiece/latest/bitpiece/struct.BitPieceI8Converter.html?search= Demonstrates example search queries for different types and generic conversions. ```text std::vec ``` ```text u32 -> bool ``` ```text Option, (T -> U) -> Option ``` -------------------------------- ### Example Search Query Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B32.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E This section provides an example of a search query that can be used within the Bitpiece project, demonstrating how to search for types that involve Option and function pointer conversions. ```APIDOC ## Example Searches * Option, (T -> U) -> Option ``` -------------------------------- ### Example Searches Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B56.html?search= Illustrative examples of search queries that can be performed. ```APIDOC Example searches: * std::vec * u32 -> bool * Option, (T -> U) -> Option ``` -------------------------------- ### SB63 Search Examples Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB63.html?search= Examples of how to perform searches using the SB63 functionality. ```APIDOC ## Search Examples ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### BitsMut Get Bits No Shift Method Source: https://docs.rs/bitpiece/latest/src/bitpiece/mut_ref.rs.html?search=u32+-%3E+bool Extracts a specified number of bits starting from a relative bit index, but returns them without shifting. This preserves their original position within the storage. ```rust /// returns `len` bits starting at relative bit index `rel_bit_index`, but returns them at their original bit position. /// basically, this only masks the value, without shifting. #[inline(always)] pub const fn get_bits_noshift(&self, rel_bit_index: usize, len: usize) -> u64 { extract_bits_noshift( self.storage.get(), self.start_bit_index + rel_bit_index, len, ) } ``` -------------------------------- ### BitsMut Get Bits Method Source: https://docs.rs/bitpiece/latest/src/bitpiece/mut_ref.rs.html Retrieves a specified number of bits starting from a relative bit index within the `BitsMut`'s range. The bits are returned shifted to their least significant position. ```rust pub const fn get_bits(&self, rel_bit_index: usize, len: usize) -> u64 { extract_bits( self.storage.get(), self.start_bit_index + rel_bit_index, len, ) } ``` -------------------------------- ### B60::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B60.html Creates a new B60 instance with the given value. Panics if the value does not fit. ```APIDOC ## B60::new ### Description Creates a new B60 instance with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### BitsMut Get Bits Method Source: https://docs.rs/bitpiece/latest/src/bitpiece/mut_ref.rs.html?search=u32+-%3E+bool Extracts a specified number of bits starting from a relative bit index within the `BitsMut` view. The extracted bits are returned shifted to their least significant position. ```rust /// returns `len` bits starting at relative bit index `rel_bit_index`. #[inline(always)] pub const fn get_bits(&self, rel_bit_index: usize, len: usize) -> u64 { extract_bits( self.storage.get(), self.start_bit_index + rel_bit_index, len, ) } ``` -------------------------------- ### SB60::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB60.html Creates a new SB60 instance with the given value. Panics if the value does not fit. ```APIDOC ## SB60::new ### Description Creates a new SB60 instance with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: < as AssociatedStorage>::Storage as BitStorage>::Signed) -> Self` ``` -------------------------------- ### B43::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B43.html Creates a new B43 instance with the given value. Panics if the value does not fit. ```APIDOC ## B43::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Method `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### BitPiece Get and Set Methods Source: https://docs.rs/bitpiece/latest/src/bitpiece/mut_ref.rs.html?search=std%3A%3Avec Defines the `get` and `set` methods for a mutable bit reference. The `get` method retrieves bit values, and the `set` method updates them. ```rust $($vis)? const fn get(&self) -> $t { let bits = self.0.get_bits(0, <$t as $crate::BitPiece>::BITS) as <$t as $crate::BitPiece>::Bits; <$t as $crate::BitPiece>::Converter::from_bits(bits) } $($vis)? const fn set(&mut self, new_value: $t) { let bits = <$t as $crate::BitPiece>::Converter::to_bits(new_value); self.0 .set_bits(0, <$t as $crate::BitPiece>::BITS, bits as u64); } ``` -------------------------------- ### B20MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B20MutRef.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new B20MutRef instance. ```APIDOC ## B20MutRef::new ### Description Creates a new `B20MutRef` instance. ### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### Parameters * `storage`: A mutable reference to the bit storage. * `start_bit_index`: The starting bit index for the B20 field. ``` -------------------------------- ### B64::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B64.html?search=std%3A%3Avec Creates a new B64 instance with the given value. Panics if the value does not fit. ```APIDOC ## B64::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### BitPiece Get and Set Implementation Source: https://docs.rs/bitpiece/latest/src/bitpiece/mut_ref.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Provides the `get` and `set` methods for a mutable reference to a BitPiece. The `get` method retrieves bits and converts them to the target type T, while `set` converts a new value to bits and stores them. ```rust let bits = self.0.get_bits(0, <$t as $crate::BitPiece>::BITS) as <$t as $crate::BitPiece>::Bits; <$t as $crate::BitPiece>::Converter::from_bits(bits) ``` ```rust let bits = <$t as $crate::BitPiece>::Converter::to_bits(new_value); self.0 .set_bits(0, <$t as $crate::BitPiece>::BITS, bits as u64); ``` -------------------------------- ### B45::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B45.html Creates a new B45 instance with the given value. Panics if the value does not fit. ```APIDOC ## fn new(value: as AssociatedStorage>::Storage) -> Self ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Method `const fn new` ### Parameters - **value** ( as AssociatedStorage>::Storage) - The value to create the B45 instance with. ``` -------------------------------- ### B63::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B63.html?search= Creates a new B63 instance with a given value. Panics if the value does not fit. ```APIDOC ## B63::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### BitPieceMutRef Trait Implementation for SB62MutRef - get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB62MutRef.html?search= Implements the `get` function from the `BitPieceMutRef` trait for `SB62MutRef`. ```rust fn get(&self) -> SB62 ``` -------------------------------- ### BitPieceU32MutRef Implementations Source: https://docs.rs/bitpiece/latest/bitpiece/struct.BitPieceU32MutRef.html?search=std%3A%3Avec Provides methods for creating, getting, and setting values for a `BitPieceU32MutRef`. ```APIDOC ## impl<'s> BitPieceU32MutRef<'s> ### `new` Constructor Creates a new `BitPieceU32MutRef`. ```rust pub const fn new( storage: BitPieceStorageMutRef<'s>, start_bit_index: usize, ) -> Self ``` ### `get` Method Retrieves the current u32 value from the bit piece. ```rust pub const fn get(&self) -> u32 ``` ### `set` Method Sets a new u32 value for the bit piece. ```rust pub const fn set(&mut self, new_value: u32) ``` ``` -------------------------------- ### BitPieceMutRef Trait Implementation for B27MutRef: get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B27MutRef.html?search= Implements the `get` function from the `BitPieceMutRef` trait for `B27MutRef`. ```rust fn get(&self) -> B27 ``` -------------------------------- ### BitPieceU32MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.BitPieceU32MutRef.html?search= Creates a new BitPieceU32MutRef. ```APIDOC ## BitPieceU32MutRef::new ### Description Creates a new `BitPieceU32MutRef`. ### Signature ```rust pub const fn new( storage: BitPieceStorageMutRef<'s>, start_bit_index: usize, ) -> Self ``` ``` -------------------------------- ### BitPieceMutRef Trait Implementation for B13MutRef: get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B13MutRef.html?search=u32+-%3E+bool Implements the `get` function from the `BitPieceMutRef` trait for `B13MutRef`. ```rust fn get(&self) -> B13 ``` -------------------------------- ### From Implementation for B2 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B2.html Details the conversion from i64 to B2. ```APIDOC ## impl From for B2 ### fn from(x: i64) -> Self Converts to this type from the input type. Source ``` -------------------------------- ### Get Inner Value of Signed Bitfield Source: https://docs.rs/bitpiece/latest/src/bitpiece/impls/sb_types.rs.html?search= The `get` method returns the underlying signed integer value stored within the bitfield. ```rust pub const fn get(&self) -> $storage_signed { self.0 } ``` -------------------------------- ### B20 Implementations Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B20.html?search= Provides various methods for creating, converting, and comparing B20 instances. ```APIDOC ## Implementations ### impl B20 #### pub const fn from_fields(fields: B20) -> B20 #### pub const fn to_fields(x: B20) -> B20 #### pub const fn try_from_bits( bits: as AssociatedStorage>::Storage, ) -> Option #### pub const fn from_bits( bits: as AssociatedStorage>::Storage, ) -> B20 #### pub const fn to_bits(x: B20) -> as AssociatedStorage>::Storage #### pub const fn const_eq(a: Self, b: Self) -> bool ``` ```APIDOC ### impl B20 #### pub const MAX: Self = Self::ONES ##### Description the max allowed value for this type. #### pub const fn new(value: as AssociatedStorage>::Storage) -> Self ##### Description creates a new instance of this bitfield type with the given value. this function panics if the value does not fit within the bit length of this type. #### pub const fn try_new( value: as AssociatedStorage>::Storage, ) -> Option ##### Description creates a new instance of this bitfield type with the given value. if the value does not fit within the bit length of this type, returns `None`. #### pub const unsafe fn new_unchecked( value: as AssociatedStorage>::Storage, ) -> Self ##### Description creates a new instance of this bitfield type with the given value, without checking that the value fits within the bit length of this type. ###### §safety the provided value must fit within the bit length of this type. #### pub const fn get(&self) -> as AssociatedStorage>::Storage ##### Description returns the inner value. ``` -------------------------------- ### B40::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B40.html?search= Creates a new B40 instance with a given value. Panics if the value exceeds 40 bits. ```APIDOC ## B40::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type (40 bits). ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### BitPieceMutRef Trait Implementation for SB19MutRef: get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB19MutRef.html?search= Implementation of the BitPieceMutRef trait's get function for SB19MutRef. Returns the current value of the bit piece. ```rust fn get(&self) -> SB19 ``` -------------------------------- ### B43MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B43MutRef.html Creates a new B43MutRef instance. ```APIDOC ## B43MutRef::new ### Description Creates a new `B43MutRef` instance. ### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### Parameters * `storage`: A mutable reference to the bit piece storage. * `start_bit_index`: The starting bit index for the B43 field. ``` -------------------------------- ### Implement BitPieceU16MutRef Source: https://docs.rs/bitpiece/latest/bitpiece/struct.BitPieceU16MutRef.html?search=std%3A%3Avec Provides methods for creating, getting, and setting values for BitPieceU16MutRef. Use `new` to create an instance from storage and an index, `get` to retrieve the current value, and `set` to update it. ```rust pub const fn new( storage: BitPieceStorageMutRef<'s>, start_bit_index: usize, ) -> Self ``` ```rust pub const fn get(&self) -> u16 ``` ```rust pub const fn set(&mut self, new_value: u16) ``` -------------------------------- ### impl SB2 - new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB2.html Creates a new SB2 instance with the given value. Panics if the value does not fit. ```APIDOC ## new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: < as AssociatedStorage>::Storage as BitStorage>::Signed) -> Self` ``` -------------------------------- ### SB3MutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB3MutRef.html?search=std%3A%3Avec Gets the value of the SB3MutRef. ```APIDOC ## SB3MutRef::get ### Description Gets the value of the SB3MutRef. ### Signature ```rust pub const fn get(&self) -> SB3 ``` ``` -------------------------------- ### B1::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B1.html Creates a new B1 instance with a given value. Panics if the value does not fit. ```APIDOC ## B1::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the provided value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### From Implementation for B8 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B8.html?search=std%3A%3Avec Details the conversion from i64 to B8. ```APIDOC ## impl From for B8 ### Methods - **from**(x: i64) -> Self - Converts to this type from the input type. ``` -------------------------------- ### SB37MutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB37MutRef.html?search= Gets the current value of the bitpiece. ```APIDOC ## SB37MutRef::get ### Description Gets the current value of the bitpiece. ### Signature ```rust pub const fn get(&self) -> SB37 ``` ``` -------------------------------- ### From for SB1 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB1.html?search=u32+-%3E+bool Conversion from i64 to SB1. ```APIDOC ### impl From for SB1 #### fn from(x: i64) -> Self Converts to this type from the input type. ``` -------------------------------- ### SB23MutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB23MutRef.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Gets the current value of the bitpiece. ```APIDOC ## SB23MutRef::get ### Description Gets the current value of the bitpiece. ### Signature ```rust pub const fn get(&self) -> SB23 ``` ``` -------------------------------- ### From Implementation for B2 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B2.html Details the conversion from u64 to B2. ```APIDOC ## impl From for B2 ### fn from(x: u64) -> Self Converts to this type from the input type. Source ``` -------------------------------- ### SB17MutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB17MutRef.html?search=std%3A%3Avec Gets the current value of the bitpiece. ```APIDOC ## SB17MutRef::get ### Description Gets the current value of the bitpiece. ### Signature ```rust pub const fn get(&self) -> SB17 ``` ``` -------------------------------- ### SB12MutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB12MutRef.html?search= Gets the current value of the bit. ```APIDOC ## SB12MutRef::get ### Description Gets the current value of the bit. ### Signature ```rust pub const fn get(&self) -> SB12 ``` ``` -------------------------------- ### SB43::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB43.html Creates a new SB43 instance with the given value. Panics if the value does not fit. ```APIDOC ## SB43::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: < as AssociatedStorage>::Storage as BitStorage>::Signed) -> Self` ``` -------------------------------- ### B7::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B7.html?search= Creates a new B7 instance with a given value, panicking if the value does not fit. ```APIDOC ## B7::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### BitPieceU32MutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.BitPieceU32MutRef.html?search= Gets the current value of the bit piece. ```APIDOC ## BitPieceU32MutRef::get ### Description Gets the current value of the bit piece. ### Signature ```rust pub const fn get(&self) -> u32 ``` ``` -------------------------------- ### From for SB1 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB1.html?search=u32+-%3E+bool Conversion from u64 to SB1. ```APIDOC ### impl From for SB1 #### fn from(x: u64) -> Self Converts to this type from the input type. ``` -------------------------------- ### BitPieceI16MutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.BitPieceI16MutRef.html?search=u32+-%3E+bool Gets the current value of the bit piece. ```APIDOC ## BitPieceI16MutRef::get ### Description Gets the current value of the bit piece. ### Signature ```rust pub const fn get(&self) -> i16 ``` ### Returns The current `i16` value of the bit piece. ``` -------------------------------- ### B40MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B40MutRef.html?search= Creates a new B40MutRef instance. ```APIDOC ## B40MutRef::new ### Description Creates a new `B40MutRef` instance. ### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### Parameters * `storage`: `BitPieceStorageMutRef<'s>` - The mutable storage for the bitfield. * `start_bit_index`: `usize` - The starting bit index of the B40 bitfield. ``` -------------------------------- ### B59MutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B59MutRef.html?search= Gets the current value of the B59 bitfield. ```APIDOC ## B59MutRef::get ### Description Gets the current value of the B59 bitfield. ### Signature ```rust pub const fn get(&self) -> B59 ``` ``` -------------------------------- ### From Implementation for B2 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B2.html Details the conversion from i32 to B2. ```APIDOC ## impl From for B2 ### fn from(x: i32) -> Self Converts to this type from the input type. Source ``` -------------------------------- ### impl Any for T Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B17.html?search= Provides the `type_id` method to get the `TypeId` of a type. ```APIDOC ## fn type_id(&self) -> TypeId ### Description Gets the `TypeId` of `self`. ### Method N/A (Associated function within a trait implementation) ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **TypeId** (TypeId) - The unique identifier for the type of `self`. ``` -------------------------------- ### From Implementation for B2 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B2.html Details the conversion from i8 to B2. ```APIDOC ## impl From for B2 ### fn from(x: i8) -> Self Converts to this type from the input type. Source ``` -------------------------------- ### impl Any for T Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B17.html Provides the `type_id` method to get the `TypeId` of an object. ```APIDOC ## fn type_id(&self) -> TypeId ### Description Gets the `TypeId` of `self`. ### Method fn type_id(&self) -> TypeId ``` -------------------------------- ### B32::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B32.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new B32 instance with a given value. Panics if the value exceeds the 32-bit limit. ```APIDOC ## B32::new ### Description Creates a new B32 instance with a given value. Panics if the value exceeds the 32-bit limit. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### impl SB2 - get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB2.html Returns the inner value of the SB2 instance. ```APIDOC ## get ### Description Returns the inner value. ### Signature `pub const fn get(&self) -> < as AssociatedStorage>::Storage as BitStorage>::Signed` ``` -------------------------------- ### B39::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B39.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new B39 instance with a given value. Panics if the value does not fit. ```APIDOC ## B39::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### BitPieceMutRef::get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB17MutRef.html?search= Implementation of the BitPieceMutRef trait's get function. ```APIDOC ## BitPieceMutRef::get for SB17MutRef ### Description Gets the current value of the bitpiece, as defined by the BitPieceMutRef trait. ### Method `fn get(&self) -> SB17` ### Returns * **SB17** - The current value of the bitpiece. ``` -------------------------------- ### BitsMut::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.BitsMut.html Constructs a new BitsMut instance. ```APIDOC ## BitsMut::new ### Description Constructs a new `BitsMut` instance. ### Signature `pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self` ``` -------------------------------- ### B8 get() Method Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B8.html?search=std%3A%3Avec Returns the inner value of the B8 bitfield. ```rust pub const fn get(&self) -> as AssociatedStorage>::Storage ``` -------------------------------- ### B52 Get Value Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B52.html?search= Retrieves the inner value of a B52 instance. ```APIDOC ## B52 Get Value ### `get` - **Signature**: `pub const fn get(&self) -> as AssociatedStorage>::Storage` - **Description**: Returns the inner value of the B52 instance. ``` -------------------------------- ### B36::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B36.html?search=u32+-%3E+bool Creates a new B36 instance with a given value. Panics if the value does not fit. ```APIDOC ## B36::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### B36 get() Method Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B36.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Returns the inner value of the B36 bitfield. ```rust pub const fn get(&self) -> as AssociatedStorage>::Storage ``` -------------------------------- ### From Implementation for B8 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B8.html?search=std%3A%3Avec Details the conversion from u64 to B8. ```APIDOC ## impl From for B8 ### Methods - **from**(x: u64) -> Self - Converts to this type from the input type. ``` -------------------------------- ### B35 get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B35.html Retrieves the inner storage value of the B35 instance. ```rust pub const fn get(&self) -> as AssociatedStorage>::Storage ``` -------------------------------- ### B60MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B60MutRef.html?search= Creates a new B60MutRef instance. ```APIDOC ## B60MutRef::new ### Description Creates a new B60MutRef instance. ### Signature `pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self` ### Parameters * `storage`: `BitPieceStorageMutRef<'s>` - The mutable storage for the bit piece. * `start_bit_index`: `usize` - The starting bit index of the 60-bit piece. ``` -------------------------------- ### B49 Constructors and Utility Functions Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B49.html This section details the various ways to create and interact with B49 instances, including safe and unsafe constructors, value retrieval, and comparison. ```APIDOC ## B49 ### Description A type used to represent a field with a specific amount of bits. ### Constants #### `MAX` * **Type**: `Self` * **Value**: `Self::ONES` * **Description**: The maximum allowed value for this type. ### Methods #### `new(value: as AssociatedStorage>::Storage) -> Self` * **Description**: Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. #### `try_new(value: as AssociatedStorage>::Storage) -> Option` * **Description**: Creates a new instance of this bitfield type with the given value. If the value does not fit within the bit length of this type, returns `None`. #### `new_unchecked(value: as AssociatedStorage>::Storage) -> Self` * **Safety**: The provided value must fit within the bit length of this type. * **Description**: Creates a new instance of this bitfield type with the given value, without checking that the value fits within the bit length of this type. #### `get(&self) -> as AssociatedStorage>::Storage` * **Description**: Returns the inner value. #### `const_eq(a: Self, b: Self) -> bool` * **Description**: Compares two B49 instances for equality. #### `from_fields(fields: B49) -> B49` * **Description**: Converts from fields (specific to B49). #### `to_fields(x: B49) -> B49` * **Description**: Converts to fields (specific to B49). #### `try_from_bits(bits: as AssociatedStorage>::Storage) -> Option` * **Description**: Attempts to create a B49 instance from bits, returning `None` if the value does not fit. #### `from_bits(bits: as AssociatedStorage>::Storage) -> B49` * **Description**: Creates a B49 instance directly from bits. #### `to_bits(x: B49) -> as AssociatedStorage>::Storage` * **Description**: Converts a B49 instance into its bit representation. ``` -------------------------------- ### B32 Get Method Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B32.html Retrieves the inner value of a B32 instance. ```APIDOC ## B32 Get Method ### `get(&self) -> as AssociatedStorage>::Storage` Returns the inner value of the B32 instance. ``` -------------------------------- ### B27MutRef Implementation: get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B27MutRef.html?search= Retrieves the current 27-bit value from the B27MutRef. ```rust pub const fn get(&self) -> B27 ``` -------------------------------- ### From Implementation for B8 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B8.html?search=std%3A%3Avec Details the conversion from i8 to B8. ```APIDOC ## impl From for B8 ### Methods - **from**(x: i8) -> Self - Converts to this type from the input type. ``` -------------------------------- ### SB61::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB61.html?search= Creates a new SB61 instance with a given signed value. Panics if the value does not fit. ```APIDOC ## SB61::new ### Description Creates a new instance of this bitfield type with the given signed value. This function panics if the value does not fit within the bit length of this type (61 bits). ### Signature `pub const fn new(value: < as AssociatedStorage>::Storage as BitStorage>::Signed) -> Self` ``` -------------------------------- ### Any Trait Implementation Example Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B29MutRef.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Demonstrates the Any trait, which provides type identity information. ```rust impl where T: 'static + ?Sized, { fn type_id(&self) -> TypeId } ``` -------------------------------- ### SB38MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB38MutRef.html?search=std%3A%3Avec Creates a new SB38MutRef with the given storage and starting bit index. ```APIDOC ## SB38MutRef::new ### Description Creates a new mutable reference to a bit sequence representing an SB38 value. ### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### Parameters * `storage`: A mutable reference to the underlying bit storage. * `start_bit_index`: The starting index of the bit sequence within the storage. ``` -------------------------------- ### SB9MutRef Implementations Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB9MutRef.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Provides methods for creating, getting, and setting values for SB9MutRef. ```APIDOC ## impl<'s> SB9MutRef<'s> ### `new` ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### `get` ```rust pub const fn get(&self) -> SB9 ``` ### `set` ```rust pub const fn set(&mut self, new_value: SB9) ``` ``` -------------------------------- ### SB8MutRef Methods Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB8MutRef.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Provides methods for creating, getting, and setting values for SB8MutRef. ```APIDOC ## SB8MutRef ### `new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self` Creates a new `SB8MutRef` instance. ### `get(&self) -> SB8` Retrieves the current 8-bit value from the mutable reference. ### `set(&mut self, new_value: SB8)` Sets a new 8-bit value at the mutable reference's position. ``` -------------------------------- ### B6MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B6MutRef.html?search= Creates a new B6MutRef instance. ```APIDOC ## B6MutRef::new ### Description Creates a new `B6MutRef` instance. ### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### Parameters * `storage`: A mutable reference to the underlying bit storage. * `start_bit_index`: The starting bit index of the B6 field. ``` -------------------------------- ### SB63MutRef Methods Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB63MutRef.html?search=std%3A%3Avec Provides methods to create, get, and set values for SB63MutRef. ```APIDOC ## SB63MutRef ### `new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self` Creates a new `SB63MutRef` instance. ### `get(&self) -> SB63` Retrieves the current `SB63` value. ### `set(&mut self, new_value: SB63)` Sets the `SB63` value. ``` -------------------------------- ### B45::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B45.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new B45 instance with the given value. Panics if the value does not fit. (Signature: pub const fn new(value: as AssociatedStorage>::Storage) -> Self) ```APIDOC ## Function: B45::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### BitPieceMutRef::get for SB62MutRef Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB62MutRef.html?search=u32+-%3E+bool Implementation of the `get` function from the `BitPieceMutRef` trait for `SB62MutRef`. ```APIDOC ## BitPieceMutRef::get for SB62MutRef ### Description Trait implementation for getting the current value. ### Signature `fn get(&self) -> SB62` ### Returns - `SB62`: The current value. ``` -------------------------------- ### Implement SB61MutRef Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB61MutRef.html?search= Provides methods for creating, getting, and setting values for SB61MutRef. ```rust pub const fn new( storage: BitPieceStorageMutRef<'s>, start_bit_index: usize, ) -> Self ``` ```rust pub const fn get(&self) -> SB61 ``` ```rust pub const fn set(&mut self, new_value: SB61) ``` -------------------------------- ### B51::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B51.html?search= Creates a new B51 instance with a given value. Panics if the value does not fit. ```APIDOC ## B51::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### From Implementation for B8 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B8.html?search=std%3A%3Avec Details the conversion from i32 to B8. ```APIDOC ## impl From for B8 ### Methods - **from**(x: i32) -> Self - Converts to this type from the input type. ``` -------------------------------- ### SB60MutRef Methods Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB60MutRef.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Provides methods for creating, getting, and setting values for SB60MutRef. ```APIDOC ## SB60MutRef ### `new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self` Creates a new `SB60MutRef`. ### `get(&self) -> SB60` Returns the current value of the bitpiece. ### `set(&mut self, new_value: SB60)` Sets the value of the bitpiece to `new_value`. ``` -------------------------------- ### SB2::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB2.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new SB2 instance with the given signed value. Panics if the value does not fit. ```APIDOC ## SB2::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: < as AssociatedStorage>::Storage as BitStorage>::Signed) -> Self` ``` -------------------------------- ### Default Implementation for SB59 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB59.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Provides a method to get the default value for SB59. ```APIDOC ### impl Default for SB59 #### fn default() -> SB59 Returns the “default value” for a type. ``` -------------------------------- ### B55::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B55.html Creates a new B55 instance with a given value. Panics if the value does not fit. ```APIDOC ## B55::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Method `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### SB59MutRef Implementations Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB59MutRef.html?search=std%3A%3Avec Provides methods for creating, getting, and setting values for SB59MutRef. ```APIDOC ### impl<'s> SB59MutRef<'s> * **`pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self`**: Creates a new SB59MutRef. * **`pub const fn get(&self) -> SB59`**: Retrieves the SB59 value from the reference. * **`pub const fn set(&mut self, new_value: SB59)`**: Sets the SB59 value at the referenced bit position. ``` -------------------------------- ### SB59MutRef Implementation: get Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB59MutRef.html?search= Retrieves the current value of the bits represented by SB59MutRef. ```rust pub const fn get(&self) -> SB59 ``` -------------------------------- ### From for B55 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B55.html?search= Conversion from i64 to B55. ```APIDOC ## impl From for B55 ### fn from(x: i64) -> Self Converts to this type from the input type. ``` -------------------------------- ### Get Inner Value of SB52 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB52.html?search=std%3A%3Avec Returns the inner value of the SB52 instance. ```rust pub const fn get( &self, ) -> < as AssociatedStorage>::Storage as BitStorage>::Signed ``` -------------------------------- ### B38 Implementations Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B38.html?search=u32+-%3E+bool Provides various methods for creating, converting, and comparing B38 instances. ```APIDOC ### impl B38 #### `const fn from_fields(fields: B38) -> B38` #### `const fn to_fields(x: B38) -> B38` #### `const fn try_from_bits(bits: as AssociatedStorage>::Storage) -> Option` #### `const fn from_bits(bits: as AssociatedStorage>::Storage) -> B38` #### `const fn to_bits(x: B38) -> as AssociatedStorage>::Storage` #### `const fn const_eq(a: Self, b: Self) -> bool` ``` ```APIDOC ### impl B38 #### `const MAX: Self = Self::ONES` ##### Description the max allowed value for this type. #### `const fn new(value: as AssociatedStorage>::Storage) -> Self` ##### Description creates a new instance of this bitfield type with the given value. this function panics if the value does not fit within the bit length of this type. #### `const fn try_new(value: as AssociatedStorage>::Storage) -> Option` ##### Description creates a new instance of this bitfield type with the given value. if the value does not fit within the bit length of this type, returns `None`. #### `unsafe const fn new_unchecked(value: as AssociatedStorage>::Storage) -> Self` ##### Description creates a new instance of this bitfield type with the given value, without checking that the value fits within the bit length of this type. ###### §safety the provided value must fit within the bit length of this type. #### `const fn get(&self) -> as AssociatedStorage>::Storage` ##### Description returns the inner value. ``` -------------------------------- ### B38MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B38MutRef.html?search= Creates a new B38MutRef instance. ```APIDOC ## B38MutRef::new ### Description Creates a new `B38MutRef` instance. ### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### Parameters * `storage`: A mutable reference to the bit piece storage. * `start_bit_index`: The starting bit index for this B38. ### Returns A new `B38MutRef` instance. ``` -------------------------------- ### BitPieceMutRef::get (for SB50MutRef) Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB50MutRef.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Trait implementation for getting the value of the SB50 bitpiece. ```APIDOC ## BitPieceMutRef::get for SB50MutRef ### Description Trait implementation for retrieving the current value of the SB50 bitpiece. ### Returns - `SB50` - The current value of the bitpiece. ``` -------------------------------- ### Get Inner Value of SB4 Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB4.html?search= Returns the inner value of the SB4 bitfield. ```rust pub const fn get( &self, ) -> < as AssociatedStorage>::Storage as BitStorage>::Signed ``` -------------------------------- ### B38MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B38MutRef.html Creates a new B38MutRef instance. ```APIDOC ## B38MutRef::new ### Description Creates a new `B38MutRef` instance. ### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### Parameters * `storage`: A mutable reference to the underlying bit storage. * `start_bit_index`: The starting bit index for this `B38MutRef`. ``` -------------------------------- ### Get SB50 Value Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB50MutRef.html Retrieves the current SB50 value from the mutable reference. ```rust pub const fn get(&self) -> SB50 ``` -------------------------------- ### B43MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B43MutRef.html?search=std%3A%3Avec Creates a new B43MutRef instance. It takes a mutable reference to the storage and the starting bit index. ```APIDOC ## B43MutRef::new ### Description Creates a new `B43MutRef` instance. ### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### Parameters * `storage`: A mutable reference to the `BitPieceStorageMutRef`. * `start_bit_index`: The starting bit index for this reference. ``` -------------------------------- ### SB4MutRef Methods Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB4MutRef.html?search=std%3A%3Avec Provides methods for creating, getting, and setting values for SB4MutRef. ```APIDOC ## SB4MutRef ```rust pub struct SB4MutRef<'s>(pub BitsMut<'s>); ``` ### `new` Creates a new `SB4MutRef`. #### Signature ```rust pub const fn new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self ``` ### `get` Gets the current value of the `SB4MutRef`. #### Signature ```rust pub const fn get(&self) -> SB4 ``` ### `set` Sets the value of the `SB4MutRef`. #### Signature ```rust pub const fn set(&mut self, new_value: SB4) ``` ``` -------------------------------- ### B9::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B9.html?search=u32+-%3E+bool Creates a new B9 instance with a given value. Panics if the value does not fit. ```APIDOC ## B9::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### SB47MutRef Methods Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB47MutRef.html Provides methods for creating, getting, and setting values for SB47MutRef. ```APIDOC ## SB47MutRef Methods ### `new(storage: BitPieceStorageMutRef<'s>, start_bit_index: usize) -> Self` Creates a new `SB47MutRef` instance. ### `get(&self) -> SB47` Retrieves the current `SB47` value from the referenced bits. ### `set(&mut self, new_value: SB47)` Sets a new `SB47` value to the referenced bits. ``` -------------------------------- ### B64MutRef::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B64MutRef.html?search= Creates a new B64MutRef instance. ```APIDOC ## B64MutRef::new ### Description Creates a new `B64MutRef` instance. ### Signature ```rust pub const fn new( storage: BitPieceStorageMutRef<'s>, start_bit_index: usize, ) -> Self ``` ### Parameters * `storage`: The mutable storage for the bit piece. * `start_bit_index`: The starting bit index for the B64 value. ``` -------------------------------- ### B24::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B24.html?search= Creates a new B24 instance with a given value. Panics if the value does not fit. ```APIDOC ## B24::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### type_id Method Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB45.html Gets the `TypeId` of the object. This method is part of the `Any` trait implementation. ```APIDOC ## fn type_id(&self) -> TypeId ### Description Gets the `TypeId` of `self`. ### Method `type_id` ### Parameters None ### Response - `TypeId`: The type identifier of the object. ``` -------------------------------- ### Implement SB42MutRef Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB42MutRef.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Provides methods for creating, getting, and setting values for SB42MutRef. ```rust pub const fn new( storage: BitPieceStorageMutRef<'s>, start_bit_index: usize, ) -> Self ``` ```rust pub const fn get(&self) -> SB42 ``` ```rust pub const fn set(&mut self, new_value: SB42) ``` -------------------------------- ### B20::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B20.html Creates a new instance of B20 with the given value. Panics if the value does not fit within 20 bits. ```APIDOC ## B20::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type. ### Signature ```rust pub const fn new(value: as AssociatedStorage>::Storage) -> Self ``` ### Parameters * `value` - The storage type representing the value to be set for the B20 field. ``` -------------------------------- ### B41::new Source: https://docs.rs/bitpiece/latest/bitpiece/struct.B41.html?search=u32+-%3E+bool Creates a new B41 instance with a given value. Panics if the value exceeds 41 bits. ```APIDOC ## B41::new ### Description Creates a new instance of this bitfield type with the given value. This function panics if the value does not fit within the bit length of this type (41 bits). ### Signature `pub const fn new(value: as AssociatedStorage>::Storage) -> Self` ``` -------------------------------- ### type_id Source: https://docs.rs/bitpiece/latest/bitpiece/struct.SB39.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Gets the `TypeId` of `self`. This is a fundamental method for runtime type identification. ```APIDOC ## fn type_id(&self) -> TypeId ### Description Gets the `TypeId` of `self`. ### Returns - `TypeId`: The unique identifier for the type of `self`. ```