pub struct Dict { /* private fields */ }Expand description
nouns ブロックの名詞辞書。識別子で引く。
Implementations§
Source§impl Dict
impl Dict
Sourcepub fn from_block(block: Option<&NounsBlock>) -> Dict
pub fn from_block(block: Option<&NounsBlock>) -> Dict
語形は書かれていなければ順に埋める。 識別子 → 単数形 → 複数形 / 略語、の一方通行。
pub fn get(&self, id: &str) -> Option<&Entry>
pub fn entries(&self) -> impl Iterator<Item = &Entry>
pub fn plural(&self, id: &str) -> Resolved
pub fn singular(&self, id: &str) -> Resolved
pub fn short(&self, id: &str) -> Resolved
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dict
impl RefUnwindSafe for Dict
impl Send for Dict
impl Sync for Dict
impl Unpin for Dict
impl UnsafeUnpin for Dict
impl UnwindSafe for Dict
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