pub struct MessageLocator { /* private fields */ }

Implementations

Constructs a MessageLocator object.

Returns a set of supported locale codes, reflecting the ones that were specified when constructing the MessageLocator.

Returns true if the locale is one of the supported locales that were specified when constructing the MessageLocator, otherwise false.

Returns the currently loaded locale.

Returns the currently loaded locale followed by its fallbacks or empty if no locale is loaded.

Attempts to load the specified locale and its fallbacks. If any resource fails to load, the method returns false, otherwise true.

Attempts to load a locale and its fallbacks. If the locale argument is specified, it is loaded. Otherwise, if there is a default locale, it is loaded, and if not, the method panics.

If any resource fails to load, the method returns false, otherwise true.

Retrieves message by identifier.

Retrieves message by identifier with formatting arguments.

Trait Implementations

Clones the locator, sharing the same resources.

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more