pub struct Unsigned64BitProvider { /* private fields */ }Expand description
A u64 data provider.
§Notes
u64are always stored in an little endian fashion to avoid any variances due to platform storage conventions.
Implementations§
Source§impl Unsigned64BitProvider
impl Unsigned64BitProvider
Sourcepub fn new(length: usize) -> Self
pub fn new(length: usize) -> Self
Creates a new u64 data provider that returns length 64-bit unsigned
integers (stored in a little endian representation).
§Examples
use bitbelay_providers::numeric::Unsigned64BitProvider;
// The trait must also be in scope to access the `provide()` method.
use bitbelay_providers::Provider as _;
let mut provider = Unsigned64BitProvider::new(10);
let data = provider.provide(20);
assert_eq!(data.len(), 20);
// Note that each u64 is eight (8) bytes, so we can expect a length
// of `10 * 8 = 80`.
assert_eq!(data.first().unwrap().len(), 80);Trait Implementations§
Source§impl Debug for Unsigned64BitProvider
impl Debug for Unsigned64BitProvider
Source§impl Default for Unsigned64BitProvider
impl Default for Unsigned64BitProvider
Source§fn default() -> Unsigned64BitProvider
fn default() -> Unsigned64BitProvider
Returns the “default value” for a type. Read more
Source§impl Provider for Unsigned64BitProvider
impl Provider for Unsigned64BitProvider
Auto Trait Implementations§
impl Freeze for Unsigned64BitProvider
impl !RefUnwindSafe for Unsigned64BitProvider
impl !Send for Unsigned64BitProvider
impl !Sync for Unsigned64BitProvider
impl Unpin for Unsigned64BitProvider
impl !UnwindSafe for Unsigned64BitProvider
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
Mutably borrows from an owned value. Read more