pub struct ThemeResource {
pub manifest: ThemeManifest,
pub path: PathBuf,
pub theme_toml_path: PathBuf,
pub layer_precedence: u32,
}Expand description
A discovered theme resource with its manifest, filesystem path, and layer precedence.
The manifest metadata is available immediately. The full Theme can be
constructed on demand via load_theme.
Fields§
§manifest: ThemeManifestThe parsed theme manifest (metadata only).
path: PathBufAbsolute path to the theme directory.
theme_toml_path: PathBufPath to the theme.toml file for on-demand color loading.
layer_precedence: u32Precedence value of the discovery layer that produced this resource.
Implementations§
Source§impl ThemeResource
impl ThemeResource
Sourcepub fn load_theme(&self) -> Result<Theme, ThemeDiscoveryError>
pub fn load_theme(&self) -> Result<Theme, ThemeDiscoveryError>
Load the full theme from the TOML file on demand.
Reads the theme.toml, parses all color tokens, validates against the
theme token schema, and constructs a Theme. Missing tokens inherit
from the default theme.
Trait Implementations§
Source§impl Clone for ThemeResource
impl Clone for ThemeResource
Source§fn clone(&self) -> ThemeResource
fn clone(&self) -> ThemeResource
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 moreAuto Trait Implementations§
impl Freeze for ThemeResource
impl RefUnwindSafe for ThemeResource
impl Send for ThemeResource
impl Sync for ThemeResource
impl Unpin for ThemeResource
impl UnsafeUnpin for ThemeResource
impl UnwindSafe for ThemeResource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<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>
Converts
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>
Converts
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