[−][src]Struct grin_chain::txhashset::BitmapChunk
A bitmap "chunk" representing 1024 contiguous bits of the overall bitmap. The first 1024 bits belong in one chunk. The next 1024 bits in the next chunk, etc.
Methods
impl BitmapChunk
[src]
pub fn new() -> BitmapChunk
[src]
Create a new bitmap chunk, defaulting all bits in the chunk to false.
pub fn set(&mut self, idx: u64, value: bool)
[src]
Set a single bit in this chunk. 0-indexed from start of chunk. Panics if idx is outside the valid range of bits in a chunk.
pub fn any(&self) -> bool
[src]
Does this bitmap chunk have any bits set to 1?
Trait Implementations
impl Clone for BitmapChunk
[src]
fn clone(&self) -> BitmapChunk
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BitmapChunk
[src]
impl DefaultHashable for BitmapChunk
[src]
impl PMMRable for BitmapChunk
[src]
type E = Self
The type of element actually stored in the MMR data file. This allows us to store Hash elements in the header MMR for variable size BlockHeaders. Read more
fn as_elmt(&self) -> Self::E
[src]
fn elmt_size() -> Option<u16>
[src]
impl Readable for BitmapChunk
[src]
fn read(_reader: &mut dyn Reader) -> Result<BitmapChunk, Error>
[src]
Reading is not currently supported, just return an empty one for now. We store the underlying roaring bitmap externally for the bitmap accumulator and the "hash only" backend means we never actually read these chunks.
impl Writeable for BitmapChunk
[src]
Auto Trait Implementations
impl RefUnwindSafe for BitmapChunk
impl Send for BitmapChunk
impl Sync for BitmapChunk
impl Unpin for BitmapChunk
impl UnwindSafe for BitmapChunk
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Send + Sync> where
T: Send + Sync,
T: Send + Sync,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
T: 'a + Clone + Send + Sync,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<D> Hashed for D where
D: DefaultHashable,
[src]
D: DefaultHashable,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> PMMRIndexHashable for T where
T: DefaultHashable,
[src]
T: DefaultHashable,
fn hash_with_index(&self, index: u64) -> Hash
[src]
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<H> ShortIdentifiable for H where
H: Hashed,
[src]
H: Hashed,
fn short_id(&self, hash: &Hash, nonce: u64) -> ShortId
[src]
Generate a short_id via the following -
- extract k0/k1 from block_hash hashed with the nonce (first two u64
values) * initialize a siphasher24 with k0/k1
- self.hash() passing in the siphasher24 instance
- drop the 2 most significant bytes (to return a 6 byte short_id)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,