pub struct ConfigFs {
pub variables: Option<Vec<(String, String)>>,
pub scrolls: Option<HashMap<String, Vec<String>>>,
pub projects: Vec<ConfigFsProject>,
pub shared: Option<Vec<ConfigFsShared>>,
pub critical: Option<Vec<ConfigFsCritical>>,
pub shared_spells: HashSet<String>,
pub lock: Option<bool>,
pub custom_animations: HashMap<String, String>,
}
Expand description
Represents the main configuration structure for GrimoireCSS.
Fields§
§variables: Option<Vec<(String, String)>>
§scrolls: Option<HashMap<String, Vec<String>>>
§projects: Vec<ConfigFsProject>
§critical: Option<Vec<ConfigFsCritical>>
A set of shared spells used across different projects.
lock: Option<bool>
§custom_animations: HashMap<String, String>
Implementations§
Source§impl ConfigFs
impl ConfigFs
Sourcepub fn load(current_dir: &Path) -> Result<Self, GrimoireCssError>
pub fn load(current_dir: &Path) -> Result<Self, GrimoireCssError>
Loads the configuration from the file system.
Reads a JSON configuration file from the file system and deserializes it into a Config
object.
Also searches for and loads any external scroll files (grimoire..scrolls.json)
and any external variables files (grimoire..variables.json).
§Errors
Returns a GrimoireCSSError
if reading or parsing the file fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigFs
impl RefUnwindSafe for ConfigFs
impl Send for ConfigFs
impl Sync for ConfigFs
impl Unpin for ConfigFs
impl UnwindSafe for ConfigFs
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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