pub trait InsertBitsIntoVecU8 {
// Required method
fn set<T>(
&mut self,
byte_offset: u32,
bit_offset: u32,
length: u32,
value: T,
) -> Result<(), String>
where Self: Sized,
T: Sized + SignedInfo + AsPrimitive<u8> + AsPrimitive<i8> + AsPrimitive<u16> + AsPrimitive<i16> + AsPrimitive<u32> + AsPrimitive<i32> + AsPrimitive<u64> + AsPrimitive<i64> + ToString + SingleBits + Copy;
}Expand description
Defines a functions, which inserts a range of bits into a Vec
Required Methods§
Sourcefn set<T>(
&mut self,
byte_offset: u32,
bit_offset: u32,
length: u32,
value: T,
) -> Result<(), String>where
Self: Sized,
T: Sized + SignedInfo + AsPrimitive<u8> + AsPrimitive<i8> + AsPrimitive<u16> + AsPrimitive<i16> + AsPrimitive<u32> + AsPrimitive<i32> + AsPrimitive<u64> + AsPrimitive<i64> + ToString + SingleBits + Copy,
fn set<T>(
&mut self,
byte_offset: u32,
bit_offset: u32,
length: u32,
value: T,
) -> Result<(), String>where
Self: Sized,
T: Sized + SignedInfo + AsPrimitive<u8> + AsPrimitive<i8> + AsPrimitive<u16> + AsPrimitive<i16> + AsPrimitive<u32> + AsPrimitive<i32> + AsPrimitive<u64> + AsPrimitive<i64> + ToString + SingleBits + Copy,
inserts a range of bits into a Vec
Parameters:
- byte_offset (u32) the number of bytes to skip
- bit_offset (u32) the number of bits to skip. Zero is the most significant bit
- length (u32) the number of bits to be inserted.
- value (u32) the value to be inserted.