pub struct UserDictionaryBuilder { /* private fields */ }Expand description
사용자 사전 빌더 (빌더 패턴)
Implementations§
Source§impl UserDictionaryBuilder
impl UserDictionaryBuilder
Sourcepub fn new() -> UserDictionaryBuilder
pub fn new() -> UserDictionaryBuilder
새 빌더 생성
Sourcepub fn default_cost(self, cost: i16) -> UserDictionaryBuilder
pub fn default_cost(self, cost: i16) -> UserDictionaryBuilder
기본 비용 설정
Sourcepub fn add(self, surface: &str, pos: &str) -> UserDictionaryBuilder
pub fn add(self, surface: &str, pos: &str) -> UserDictionaryBuilder
엔트리 추가
Sourcepub fn add_with_cost(
self,
surface: &str,
pos: &str,
cost: i16,
) -> UserDictionaryBuilder
pub fn add_with_cost( self, surface: &str, pos: &str, cost: i16, ) -> UserDictionaryBuilder
비용과 함께 엔트리 추가
Sourcepub fn add_full(
self,
surface: &str,
pos: &str,
cost: i16,
reading: Option<&str>,
) -> UserDictionaryBuilder
pub fn add_full( self, surface: &str, pos: &str, cost: i16, reading: Option<&str>, ) -> UserDictionaryBuilder
모든 정보와 함께 엔트리 추가
Sourcepub fn load_csv<P>(self, path: P) -> Result<UserDictionaryBuilder, DictError>
pub fn load_csv<P>(self, path: P) -> Result<UserDictionaryBuilder, DictError>
Sourcepub fn build(self) -> UserDictionary
pub fn build(self) -> UserDictionary
사전 빌드
Sourcepub fn build_with_trie(self) -> Result<UserDictionary, DictError>
pub fn build_with_trie(self) -> Result<UserDictionary, DictError>
Trait Implementations§
Source§impl Default for UserDictionaryBuilder
impl Default for UserDictionaryBuilder
Source§fn default() -> UserDictionaryBuilder
fn default() -> UserDictionaryBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UserDictionaryBuilder
impl RefUnwindSafe for UserDictionaryBuilder
impl Send for UserDictionaryBuilder
impl Sync for UserDictionaryBuilder
impl Unpin for UserDictionaryBuilder
impl UnsafeUnpin for UserDictionaryBuilder
impl UnwindSafe for UserDictionaryBuilder
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