pub enum DictStorage {
Mmap(Arc<Mmap>),
Static(&'static [u8]),
Owned(Arc<Vec<u8>>),
}Expand description
Backing storage for Dict data. Holds either a memory-mapped file,
a 'static byte slice (used by the embedded feature), or an owned
allocation. All three implement [AsRef<[u8]>] so fst::Map can wrap
them uniformly.
Variants§
Mmap(Arc<Mmap>)
Memory-mapped file; the Arc keeps the mapping alive while any
reference into it exists.
Static(&'static [u8])
'static slice — typically from include_bytes!.
Owned(Arc<Vec<u8>>)
Owned buffer on the heap.
Trait Implementations§
Source§impl AsRef<[u8]> for DictStorage
impl AsRef<[u8]> for DictStorage
Source§impl Clone for DictStorage
impl Clone for DictStorage
Source§fn clone(&self) -> DictStorage
fn clone(&self) -> DictStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DictStorage
impl RefUnwindSafe for DictStorage
impl Send for DictStorage
impl Sync for DictStorage
impl Unpin for DictStorage
impl UnsafeUnpin for DictStorage
impl UnwindSafe for DictStorage
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