pub struct MetadataLoader {}Expand description
MetadataLoader is a loader for reading persisted metadata files.
§Examples
use lindera_dictionary::dictionary_loader::metadata::MetadataLoader;
use std::path::Path;
// Normal loading
let metadata = MetadataLoader::load(Path::new("/path/to/dictionary"))?;
// Memory-mapped loading (when mmap feature is enabled)
#[cfg(feature = "mmap")]
let metadata = MetadataLoader::load_mmap(Path::new("/path/to/dictionary"))?;Implementations§
Source§impl MetadataLoader
impl MetadataLoader
Sourcepub fn load(input_dir: &Path) -> LinderaResult<Metadata>
pub fn load(input_dir: &Path) -> LinderaResult<Metadata>
Sourcepub fn load_mmap(input_dir: &Path) -> LinderaResult<Metadata>
pub fn load_mmap(input_dir: &Path) -> LinderaResult<Metadata>
Auto Trait Implementations§
impl Freeze for MetadataLoader
impl RefUnwindSafe for MetadataLoader
impl Send for MetadataLoader
impl Sync for MetadataLoader
impl Unpin for MetadataLoader
impl UnwindSafe for MetadataLoader
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