pub struct RomajiMatchConfig<'a> { /* private fields */ }
Available on crate feature
romaji
only.Expand description
§Performance
To avoid initialization cost, you should share one romanizer
across all configs by either passing &romanizer
:
use ib_matcher::{matcher::RomajiMatchConfig, romaji::HepburnRomanizer};
let romanizer = HepburnRomanizer::default();
let config = RomajiMatchConfig::builder().romanizer(&romanizer).build();
let config2 = RomajiMatchConfig::builder().romanizer(&romanizer).build();
Or using shallow_clone()
:
use ib_matcher::matcher::RomajiMatchConfig;
let config = RomajiMatchConfig::default();
let config2 = config.shallow_clone();
Implementations§
Source§impl<'a> RomajiMatchConfig<'a>
impl<'a> RomajiMatchConfig<'a>
Sourcepub fn builder() -> RomajiMatchConfigBuilder<'a>
pub fn builder() -> RomajiMatchConfigBuilder<'a>
Create an instance of RomajiMatchConfig
using the builder syntax
Source§impl<'a> RomajiMatchConfig<'a>
impl<'a> RomajiMatchConfig<'a>
Sourcepub fn shallow_clone(&'a self) -> RomajiMatchConfig<'a>
pub fn shallow_clone(&'a self) -> RomajiMatchConfig<'a>
See RomajiMatchConfig
.
Trait Implementations§
Source§impl<'a> Clone for RomajiMatchConfig<'a>
impl<'a> Clone for RomajiMatchConfig<'a>
Source§fn clone(&self) -> RomajiMatchConfig<'a>
fn clone(&self) -> RomajiMatchConfig<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for RomajiMatchConfig<'_>
impl Default for RomajiMatchConfig<'_>
Source§fn default() -> Self
fn default() -> Self
Use RomajiMatchConfigBuilder
for more options.
Auto Trait Implementations§
impl<'a> Freeze for RomajiMatchConfig<'a>
impl<'a> RefUnwindSafe for RomajiMatchConfig<'a>
impl<'a> Send for RomajiMatchConfig<'a>
impl<'a> Sync for RomajiMatchConfig<'a>
impl<'a> Unpin for RomajiMatchConfig<'a>
impl<'a> UnwindSafe for RomajiMatchConfig<'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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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