pub struct LeBuf { /* private fields */ }Expand description
The write half: an append-only buffer with the same field vocabulary, plus the patch-back-in-place the bbi writer needs for counts and offsets whose values are only known once what follows them has been built.
Implementations§
Source§impl LeBuf
impl LeBuf
pub fn new() -> Self
pub fn with_capacity(n: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn into_bytes(self) -> Bytes
pub fn put_bytes(&mut self, data: &[u8])
pub fn put_zeros(&mut self, n: usize)
Sourcepub fn put_padded_str(&mut self, s: &str, width: usize) -> Result<()>
pub fn put_padded_str(&mut self, s: &str, width: usize) -> Result<()>
Zero-padded to a fixed width, as the chromosome B+ tree stores keys.
A name longer than width is an error rather than a truncation: a
silently truncated key breaks chromosome resolution in a way that only
surfaces at read time.
Source§impl LeBuf
impl LeBuf
pub fn put_u8(&mut self, value: u8)
Sourcepub fn set_u8(&mut self, offset: usize, value: u8)
pub fn set_u8(&mut self, offset: usize, value: u8)
Overwrite a field already placed. Panics if it does not fit, which would be a bug in the writer rather than bad input.
pub fn put_u16(&mut self, value: u16)
Sourcepub fn set_u16(&mut self, offset: usize, value: u16)
pub fn set_u16(&mut self, offset: usize, value: u16)
Overwrite a field already placed. Panics if it does not fit, which would be a bug in the writer rather than bad input.
pub fn put_u32(&mut self, value: u32)
Sourcepub fn set_u32(&mut self, offset: usize, value: u32)
pub fn set_u32(&mut self, offset: usize, value: u32)
Overwrite a field already placed. Panics if it does not fit, which would be a bug in the writer rather than bad input.
pub fn put_i32(&mut self, value: i32)
Sourcepub fn set_i32(&mut self, offset: usize, value: i32)
pub fn set_i32(&mut self, offset: usize, value: i32)
Overwrite a field already placed. Panics if it does not fit, which would be a bug in the writer rather than bad input.
pub fn put_u64(&mut self, value: u64)
Sourcepub fn set_u64(&mut self, offset: usize, value: u64)
pub fn set_u64(&mut self, offset: usize, value: u64)
Overwrite a field already placed. Panics if it does not fit, which would be a bug in the writer rather than bad input.
pub fn put_i64(&mut self, value: i64)
Sourcepub fn set_i64(&mut self, offset: usize, value: i64)
pub fn set_i64(&mut self, offset: usize, value: i64)
Overwrite a field already placed. Panics if it does not fit, which would be a bug in the writer rather than bad input.
pub fn put_f32(&mut self, value: f32)
Sourcepub fn set_f32(&mut self, offset: usize, value: f32)
pub fn set_f32(&mut self, offset: usize, value: f32)
Overwrite a field already placed. Panics if it does not fit, which would be a bug in the writer rather than bad input.
pub fn put_f64(&mut self, value: f64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LeBuf
impl RefUnwindSafe for LeBuf
impl Send for LeBuf
impl Sync for LeBuf
impl Unpin for LeBuf
impl UnsafeUnpin for LeBuf
impl UnwindSafe for LeBuf
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more