pub struct LoadedMod {
pub dir_name: String,
pub config: ModConfig,
pub configuration: HashMap<String, Value>,
pub enabled: bool,
pub load_error: Option<String>,
pub warnings: Vec<String>,
}Expand description
One mod discovered under .supreme/mods/.
Fields§
§dir_name: StringThe folder name under .supreme/mods/, the stable identifier used
as an entry in mods.json’s active configuration
(order/enabled/configuration), and as the key into
ModsPageState::selected.
config: ModConfigThis mod’s author-owned, static definition, name/metadata, rules,
parameters, and default values for them (config.configuration).
Defaults are author-set, not per-user, the actual per-user state
is the sibling configuration field below, kept deliberately
separate so editing a setting never touches this mod’s mod.json.
configuration: HashMap<String, Value>This mod’s current parameter overrides, only what a person has
actually changed via the launcher, loaded from (and, on any edit,
persisted back to) the active configuration in the shared
mods.json. A parameter with no entry here falls back to
config.configuration’s default for it, then to fully unset.
enabled: bool§load_error: Option<String>Set if this mod’s mod.json failed to parse, or parsed but didn’t
pass ModConfig::validate. The row still shows, with this
message instead of a configuration editor, rather than the mod
silently vanishing from the list.
warnings: Vec<String>Non-fatal warnings discovered while loading this mod’s mod.json
typically unknown keys that suggest the mod uses features not yet
supported by this launcher version. Displayed subtly in the UI
rather than blocking the mod from loading.
Auto Trait Implementations§
impl Freeze for LoadedMod
impl RefUnwindSafe for LoadedMod
impl Send for LoadedMod
impl Sync for LoadedMod
impl Unpin for LoadedMod
impl UnsafeUnpin for LoadedMod
impl UnwindSafe for LoadedMod
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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