pub struct StaticFluentMessageKey { /* private fields */ }Expand description
A fully scoped Fluent message key emitted by derive macros.
owner identifies the crate whose i18n.toml defines domain. Domains are
package-local, so two crates may both define a domain such as ui without
sharing runtime lookup scope. Generated fallback text is lookup metadata and
does not participate in equality or hashing.
Implementations§
Source§impl StaticFluentMessageKey
impl StaticFluentMessageKey
Sourcepub const fn new(
owner: StaticFluentDomain,
domain: StaticFluentDomain,
id: StaticFluentEntryId,
) -> StaticFluentMessageKey
pub const fn new( owner: StaticFluentDomain, domain: StaticFluentDomain, id: StaticFluentEntryId, ) -> StaticFluentMessageKey
Creates a fully scoped key from validated static parts.
Sourcepub const fn with_fallback(
owner: StaticFluentDomain,
domain: StaticFluentDomain,
id: StaticFluentEntryId,
fallback: &'static str,
) -> StaticFluentMessageKey
pub const fn with_fallback( owner: StaticFluentDomain, domain: StaticFluentDomain, id: StaticFluentEntryId, fallback: &'static str, ) -> StaticFluentMessageKey
Creates a fully scoped key with a generated fallback string.
Sourcepub const fn owner(self) -> StaticFluentDomain
pub const fn owner(self) -> StaticFluentDomain
Returns the crate that owns this key’s domain definition.
Sourcepub const fn domain(self) -> StaticFluentDomain
pub const fn domain(self) -> StaticFluentDomain
Returns the package-local Fluent domain.
Sourcepub const fn id(self) -> StaticFluentEntryId
pub const fn id(self) -> StaticFluentEntryId
Returns the Fluent message identifier.
Trait Implementations§
Source§impl Clone for StaticFluentMessageKey
impl Clone for StaticFluentMessageKey
Source§fn clone(&self) -> StaticFluentMessageKey
fn clone(&self) -> StaticFluentMessageKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StaticFluentMessageKey
Source§impl Debug for StaticFluentMessageKey
impl Debug for StaticFluentMessageKey
impl Eq for StaticFluentMessageKey
Source§impl Hash for StaticFluentMessageKey
impl Hash for StaticFluentMessageKey
Auto Trait Implementations§
impl Freeze for StaticFluentMessageKey
impl RefUnwindSafe for StaticFluentMessageKey
impl Send for StaticFluentMessageKey
impl Sync for StaticFluentMessageKey
impl Unpin for StaticFluentMessageKey
impl UnsafeUnpin for StaticFluentMessageKey
impl UnwindSafe for StaticFluentMessageKey
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