pub struct BloomRef {
inner: Arc<Mutex<LocalBloom>>,
}Expand description
Shared handle to the local bloom state. Writers add items in
place, readers take a snapshot. Cheap to clone (Arc).
Fields§
§inner: Arc<Mutex<LocalBloom>>Implementations§
Source§impl BloomRef
impl BloomRef
Sourcepub fn add<I: AsRef<[u8]>>(&self, item: I, flags: ProtocolFlags)
pub fn add<I: AsRef<[u8]>>(&self, item: I, flags: ProtocolFlags)
Add an item. Any non-empty flags advertise it; REQUIRED and
PREFERRED also mark it for local filtering. Other bits only
advertise.
Sourcepub fn snapshot(&self) -> LocalBloom
pub fn snapshot(&self) -> LocalBloom
Copy of the current local bloom state.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BloomRef
impl !UnwindSafe for BloomRef
impl Freeze for BloomRef
impl Send for BloomRef
impl Sync for BloomRef
impl Unpin for BloomRef
impl UnsafeUnpin for BloomRef
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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