pub struct HierarchicalMappingBuilder { /* private fields */ }Expand description
HierarchicalMapping を構築するためのビルダー構造体。
Implementations§
Source§impl HierarchicalMappingBuilder
impl HierarchicalMappingBuilder
Sourcepub fn negative_keys(self, keys: Vec<String>) -> Self
pub fn negative_keys(self, keys: Vec<String>) -> Self
ネガティブキーのリストを設定する。
Sourcepub fn add_negative_key(self, key: impl Into<String>) -> Self
pub fn add_negative_key(self, key: impl Into<String>) -> Self
ネガティブキーを 1 件追加する。
Sourcepub fn add_category(
&mut self,
coarse_key: impl Into<String>,
coarse_desc: impl Into<String>,
fine_items: Vec<(impl Into<String>, impl Into<String>)>,
) -> &mut Self
pub fn add_category( &mut self, coarse_key: impl Into<String>, coarse_desc: impl Into<String>, fine_items: Vec<(impl Into<String>, impl Into<String>)>, ) -> &mut Self
大分類と、その配下の細分類群を一括追加する。
§引数
coarse_key: 大分類キー。coarse_desc: 大分類の説明文。fine_items: (細分類キー, 細分類説明文) のリスト。
Sourcepub fn build(self) -> Result<HierarchicalMapping>
pub fn build(self) -> Result<HierarchicalMapping>
マッピングを検証し、構築する。
Trait Implementations§
Source§impl Clone for HierarchicalMappingBuilder
impl Clone for HierarchicalMappingBuilder
Source§fn clone(&self) -> HierarchicalMappingBuilder
fn clone(&self) -> HierarchicalMappingBuilder
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 HierarchicalMappingBuilder
impl RefUnwindSafe for HierarchicalMappingBuilder
impl Send for HierarchicalMappingBuilder
impl Sync for HierarchicalMappingBuilder
impl Unpin for HierarchicalMappingBuilder
impl UnsafeUnpin for HierarchicalMappingBuilder
impl UnwindSafe for HierarchicalMappingBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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