pub struct ModDetailsState {Show 16 fields
pub nexus_mod_id: NexusModId,
pub game_domain: String,
pub mod_page_url: String,
pub name: String,
pub author: String,
pub version: String,
pub summary: Option<String>,
pub loading: bool,
pub error: Option<String>,
pub gallery: Vec<String>,
pub gallery_index: usize,
pub thumbnail: Option<Handle>,
pub endorse_status: Option<String>,
pub endorsement_count: u64,
pub is_tracked: Option<bool>,
pub action_pending: bool,
}Expand description
Live state for the currently-selected mod’s detail panel.
Fields§
§nexus_mod_id: NexusModIdNexus mod id — used to reject stale async results when the user clicks on a different mod before the previous fetch completes.
game_domain: StringNexus game domain (e.g. "skyrimspecialedition").
mod_page_url: StringFull URL to the mod page on nexusmods.com — the “Open in Nexus” link opens this in the system browser.
name: StringLoaded metadata. Until the initial fetch returns, these carry
whatever we knew locally from EnabledMod (display_name, version).
version: String§summary: Option<String>§loading: boolTrue between sending the initial get_mod request and receiving the
response. The panel renders a “Loading…” placeholder in this state.
error: Option<String>If set, the initial fetch failed — we render the error text instead of the metadata block.
gallery: Vec<String>Image URLs for the gallery. Index 0 is typically the primary
picture_url. Empty until at least the v1 response arrives.
gallery_index: usizeWhich gallery index is currently displayed. Clicking the thumbnail
advances this (mod gallery.len()).
thumbnail: Option<Handle>Decoded bytes of the image at gallery_index, ready for rendering.
None while the image is being fetched.
endorse_status: Option<String>User’s current endorsement status for this mod. Values from Nexus:
"Undecided", "Abstained", "Endorsed". None until fetched.
endorsement_count: u64Total endorsements on the mod (not user-specific).
is_tracked: Option<bool>Whether the current user is tracking this mod. None = not yet
fetched, Some(true) = tracked, Some(false) = not tracked.
action_pending: boolTrue while an endorse/track request is in flight. Disables both buttons to prevent double-submits.
Implementations§
Source§impl ModDetailsState
impl ModDetailsState
Sourcepub fn loading(
nexus_mod_id: NexusModId,
game_domain: String,
name: String,
version: String,
) -> Self
pub fn loading( nexus_mod_id: NexusModId, game_domain: String, name: String, version: String, ) -> Self
Construct the initial “loading” state as soon as a Nexus-tracked mod is selected, before any HTTP requests complete.
Sourcepub fn current_image_url(&self) -> Option<&str>
pub fn current_image_url(&self) -> Option<&str>
The URL of the image currently displayed in the thumbnail slot, if any.
Trait Implementations§
Source§impl Clone for ModDetailsState
impl Clone for ModDetailsState
Source§fn clone(&self) -> ModDetailsState
fn clone(&self) -> ModDetailsState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for ModDetailsState
impl RefUnwindSafe for ModDetailsState
impl Send for ModDetailsState
impl Sync for ModDetailsState
impl Unpin for ModDetailsState
impl UnsafeUnpin for ModDetailsState
impl UnwindSafe for ModDetailsState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.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