pub struct FuriEncoder<'a> { /* private fields */ }Expand description
An encoder fur furigana.
Implementations§
Source§impl<'a> FuriEncoder<'a>
impl<'a> FuriEncoder<'a>
Sourcepub fn write_kana(&mut self, kana: &str)
pub fn write_kana(&mut self, kana: &str)
Writes kana to the buffer.
Sourcepub fn write_block(&mut self, kanji: &str, kana: &str)
pub fn write_block(&mut self, kanji: &str, kana: &str)
Writes a single block of [kanji|kana] to the buffer.
Sourcepub fn write_reading<R: AsReadingRef>(&mut self, r: R)
pub fn write_reading<R: AsReadingRef>(&mut self, r: R)
Writes a [jp_utils::reading::Reading] into the furi encoder.
Note that readings can contain kana characters in their kanji strings.
Sourcepub fn write_kanji<K: AsKanjiSegment>(&mut self, k: K)
pub fn write_kanji<K: AsKanjiSegment>(&mut self, k: K)
Writes a kanji segment
Trait Implementations§
Source§impl<'a, S> Extend<S> for FuriEncoder<'a>where
S: AsSegment,
impl<'a, S> Extend<S> for FuriEncoder<'a>where
S: AsSegment,
Source§fn extend<T: IntoIterator<Item = S>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = S>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl<'a> Freeze for FuriEncoder<'a>
impl<'a> RefUnwindSafe for FuriEncoder<'a>
impl<'a> Send for FuriEncoder<'a>
impl<'a> Sync for FuriEncoder<'a>
impl<'a> Unpin for FuriEncoder<'a>
impl<'a> !UnwindSafe for FuriEncoder<'a>
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