Struct rustdb::bytes::ByteStorage
source · [−]pub struct ByteStorage {
pub file: Rc<SortedFile>,
/* private fields */
}
Expand description
Storage of variable size values.
Fields
file: Rc<SortedFile>
Implementations
sourceimpl ByteStorage
impl ByteStorage
sourcepub fn new(root_page: u64, ft: usize) -> Self
pub fn new(root_page: u64, ft: usize) -> Self
Construct new ByteStorage with specified root page and fragment type.
sourcepub fn decode(&self, db: &DB, id: u64, inline: usize) -> Vec<u8>
pub fn decode(&self, db: &DB, id: u64, inline: usize) -> Vec<u8>
Decode bytes, inline bytes are reserved.
sourcepub fn repack_file(&self, db: &DB) -> i64
pub fn repack_file(&self, db: &DB) -> i64
Pack underlying file.
Auto Trait Implementations
impl !RefUnwindSafe for ByteStorage
impl !Send for ByteStorage
impl !Sync for ByteStorage
impl Unpin for ByteStorage
impl !UnwindSafe for ByteStorage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more