pub enum TrieBackend {
Owned(Trie<'static>),
Mmap(MmapTrie),
}Expand description
Trie 백엔드 통합 타입
소유 벡터 또는 mmap 중 하나를 런타임에 선택합니다.
Variants§
Implementations§
Source§impl TrieBackend
impl TrieBackend
Sourcepub fn from_file<P>(path: P) -> Result<TrieBackend, DictError>
pub fn from_file<P>(path: P) -> Result<TrieBackend, DictError>
Sourcepub fn from_mmap_file<P>(path: P) -> Result<TrieBackend, DictError>
pub fn from_mmap_file<P>(path: P) -> Result<TrieBackend, DictError>
Sourcepub fn from_compressed_file<P>(path: P) -> Result<TrieBackend, DictError>
pub fn from_compressed_file<P>(path: P) -> Result<TrieBackend, DictError>
Sourcepub fn exact_match(&self, key: &str) -> Option<u32>
pub fn exact_match(&self, key: &str) -> Option<u32>
정확히 일치하는 키 검색
Sourcepub fn exact_match_bytes(&self, key: &[u8]) -> Option<u32>
pub fn exact_match_bytes(&self, key: &[u8]) -> Option<u32>
바이트 키로 정확히 일치하는 키 검색
Auto Trait Implementations§
impl Freeze for TrieBackend
impl RefUnwindSafe for TrieBackend
impl Send for TrieBackend
impl Sync for TrieBackend
impl Unpin for TrieBackend
impl UnsafeUnpin for TrieBackend
impl UnwindSafe for TrieBackend
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
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>
Converts
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>
Converts
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