Struct poem::i18n::I18NResources
source · [−]pub struct I18NResources { /* private fields */ }
Available on crate feature
i18n
only.Expand description
A resource for translating natural language.
Implementations
sourceimpl I18NResources
impl I18NResources
sourcepub fn builder() -> I18NResourcesBuilder
pub fn builder() -> I18NResourcesBuilder
Create a resources builder.
sourcepub fn negotiate_languages(
&self,
languages: &[impl AsRef<LanguageIdentifier>]
) -> I18NBundle
pub fn negotiate_languages(
&self,
languages: &[impl AsRef<LanguageIdentifier>]
) -> I18NBundle
Negotiate the language according to the input language id list and
return the I18NBundle
.
Trait Implementations
sourceimpl Clone for I18NResources
impl Clone for I18NResources
sourcefn clone(&self) -> I18NResources
fn clone(&self) -> I18NResources
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl !RefUnwindSafe for I18NResources
impl Send for I18NResources
impl Sync for I18NResources
impl Unpin for I18NResources
impl !UnwindSafe for I18NResources
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more