pub struct Sidecar {
pub pairs: Vec<(Vec<u8>, u8)>,
pub filter: Bloom,
}Expand description
The sidecar of one sealed bundle.
Fields§
§pairs: Vec<(Vec<u8>, u8)>(key, offset in the bundle), sorted, without duplicates.
filter: BloomThe filter over every key in pairs.
Implementations§
Source§impl Sidecar
impl Sidecar
Sourcepub fn build<E: AsRef<[u8]>>(entries: &[E], keys: &KeyFn) -> Self
pub fn build<E: AsRef<[u8]>>(entries: &[E], keys: &KeyFn) -> Self
The sidecar over a bundle’s entries with the log’s key function.
Sourcepub fn key_range(&self) -> Option<(&[u8], &[u8])>
pub fn key_range(&self) -> Option<(&[u8], &[u8])>
The smallest and largest key, or nothing for an empty bundle.
Sourcepub fn from_bytes(path: &str, bytes: &[u8]) -> Result<Self>
pub fn from_bytes(path: &str, bytes: &[u8]) -> Result<Self>
The sidecar to_bytes wrote.
Trait Implementations§
impl Eq for Sidecar
impl StructuralPartialEq for Sidecar
Auto Trait Implementations§
impl Freeze for Sidecar
impl RefUnwindSafe for Sidecar
impl Send for Sidecar
impl Sync for Sidecar
impl Unpin for Sidecar
impl UnsafeUnpin for Sidecar
impl UnwindSafe for Sidecar
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