pub struct StaticModuleDescriptor { /* private fields */ }Expand description
A simple descriptor wrapper for metadata-only registrations.
This is used by asset-driven managers (e.g., Bevy) where runtime localization
is handled by the host runtime rather than by Localizer.
Implementations§
Source§impl StaticModuleDescriptor
impl StaticModuleDescriptor
Sourcepub const fn new(data: &'static ModuleData) -> Self
pub const fn new(data: &'static ModuleData) -> Self
Creates a new metadata-only descriptor.
Trait Implementations§
Source§impl I18nModuleDescriptor for StaticModuleDescriptor
impl I18nModuleDescriptor for StaticModuleDescriptor
Source§fn data(&self) -> &'static ModuleData
fn data(&self) -> &'static ModuleData
Returns static metadata for this module.
Source§impl I18nModuleRegistration for StaticModuleDescriptor
impl I18nModuleRegistration for StaticModuleDescriptor
Source§fn create_localizer(&self) -> Option<Box<dyn Localizer>>
fn create_localizer(&self) -> Option<Box<dyn Localizer>>
Creates a localizer when the registration supports runtime localization.
Source§fn supports_runtime_localization(&self) -> bool
fn supports_runtime_localization(&self) -> bool
Returns whether this registration can provide a runtime localizer. Read more
Source§fn resource_plan_for_language(
&self,
_lang: &LanguageIdentifier,
) -> Option<Vec<ModuleResourceSpec>>
fn resource_plan_for_language( &self, _lang: &LanguageIdentifier, ) -> Option<Vec<ModuleResourceSpec>>
Returns an optional manifest-derived resource plan for a specific language. Read more
Auto Trait Implementations§
impl Freeze for StaticModuleDescriptor
impl RefUnwindSafe for StaticModuleDescriptor
impl Send for StaticModuleDescriptor
impl Sync for StaticModuleDescriptor
impl Unpin for StaticModuleDescriptor
impl UnsafeUnpin for StaticModuleDescriptor
impl UnwindSafe for StaticModuleDescriptor
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