pub struct Hyw { /* private fields */ }Expand description
A combination of these characters.
Implementations§
Source§impl Hyw
impl Hyw
Sourcepub const fn from_index(index: usize) -> Option<Self>
pub const fn from_index(index: usize) -> Option<Self>
Create a Hyw from combined index. If the index is out of bounds, return None.
Sourcepub const fn next(&self) -> Option<Self>
pub const fn next(&self) -> Option<Self>
Get the next Hyw combination. If it is the last combination, return None.
Sourcepub const fn previous(&self) -> Option<Self>
pub const fn previous(&self) -> Option<Self>
Get the previous Hyw combination. If it is the first combination, return None.
Sourcepub const fn iter_from(self) -> HywIterator ⓘ
pub const fn iter_from(self) -> HywIterator ⓘ
Returns an iterator over all Hyw combinations starting from this one
Sourcepub const fn all() -> HywIterator ⓘ
pub const fn all() -> HywIterator ⓘ
Returns an iterator over all possible Hyw combinations
Sourcepub const fn set_he(&mut self, he: usize) -> bool
pub const fn set_he(&mut self, he: usize) -> bool
Set the indice of character with pinyin “he”. If the index is out of bounds, return false and do not modify the value.
Trait Implementations§
impl Copy for Hyw
impl Eq for Hyw
impl StructuralPartialEq for Hyw
Auto Trait Implementations§
impl Freeze for Hyw
impl RefUnwindSafe for Hyw
impl Send for Hyw
impl Sync for Hyw
impl Unpin for Hyw
impl UnsafeUnpin for Hyw
impl UnwindSafe for Hyw
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