Skip to main content

WorkspaceConfig

Struct WorkspaceConfig 

Source
pub struct WorkspaceConfig {
Show 35 fields pub schema: String, pub config: Option<Config>, pub config_file: Option<String>, pub extends: Option<ExtendsConfig>, pub workspace_root: String, pub name: String, pub namespace: String, pub variant: WorkspaceVariant, pub organization: WorkspaceOrganizationConfig, pub repository: String, pub license: String, pub homepage: String, pub docs: Option<String>, pub portal: Option<String>, pub licensing: Option<String>, pub contact: Option<String>, pub support: Option<String>, pub branch: String, pub preid: Option<String>, pub owner: String, pub bot: WorkspaceBotConfig, pub mode: WorkspaceMode, pub colors: WorkspaceColorsConfig, pub release: WorkspaceReleaseConfig, pub socials: WorkspaceSocialsConfig, pub error: WorkspaceErrorConfig, pub skip_cache: bool, pub registry: WorkspaceRegistryUrlConfig, pub directories: WorkspaceDirectoriesConfig, pub package_manager: PackageManagerType, pub timezone: String, pub locale: String, pub log_level: LogLevel, pub skip_config_logging: bool, pub extensions: RefCell<HashMap<String, HashMap<String, Value>>>,
}
Expand description

Storm Workspace config values used during various development processes. It represents the shared config of the entire monorepo.

Fields§

§schema: String

The JSON schema reference describing the workspace configuration

§config: Option<Config>

The configuration values parsed from the file

§config_file: Option<String>

The filepath of the Storm config. When this field is null, no config file was found in the current workspace.

§extends: Option<ExtendsConfig>

Optional configuration presets to extend from

§workspace_root: String

The root directory of the package

§name: String

The name of the package

§namespace: String

The namespace of the package

§variant: WorkspaceVariant

The configured workspace variant

§organization: WorkspaceOrganizationConfig

The organization configuration backing the workspace

§repository: String

The repo URL of the workspace (i.e. GitHub)

§license: String

The license used by the package

§homepage: String

The homepage of the workspace

§docs: Option<String>

The documentation site for the workspace

§portal: Option<String>

The development portal site for the workspace

§licensing: Option<String>

The licensing site for the workspace

§contact: Option<String>

The contact site for the workspace

§support: Option<String>

The support site for the workspace

§branch: String

The branch of the workspace

§preid: Option<String>

A tag specifying the version pre-release identifier

§owner: String

The owner of the package

§bot: WorkspaceBotConfig

The workspace bot configuration used to automate tasks

§mode: WorkspaceMode

The current workspace runtime mode (development/test/production)

§colors: WorkspaceColorsConfig

Configured color settings for the workspace

§release: WorkspaceReleaseConfig

The workspace release configuration

§socials: WorkspaceSocialsConfig

The workspace socials configuration

§error: WorkspaceErrorConfig

The workspace error configuration

§skip_cache: bool

Should all known types of workspace caching be skipped?

§registry: WorkspaceRegistryUrlConfig

The registry configuration for the workspace

§directories: WorkspaceDirectoriesConfig

The directories configuration for the workspace

§package_manager: PackageManagerType

The package manager used by the repository

§timezone: String

The default timezone of the workspace

§locale: String

The default locale of the workspace

§log_level: LogLevel

The log level used to filter out lower priority log messages. If not provided, this is defaulted using the environment config value (if environment is set to production then level is error, else level is debug).

§skip_config_logging: bool

Should the logging of the current Storm Workspace configuration be skipped?

§extensions: RefCell<HashMap<String, HashMap<String, Value>>>

Configuration of each used extension

Implementations§

Source§

impl WorkspaceConfig

Source

pub fn new() -> Result<Self, ConfigError>

Source

pub fn from_workspace_root(workspace_root: &Path) -> Result<Self, ConfigError>

Source

pub fn get_extension(&self, name: &str) -> Option<HashMap<String, Value>>

Trait Implementations§

Source§

impl Clone for WorkspaceConfig

Source§

fn clone(&self) -> WorkspaceConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WorkspaceConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WorkspaceConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl FromStr for WorkspaceConfig

Source§

type Err = ()

The associated error which can be returned from parsing.
Source§

fn from_str(input: &str) -> Result<WorkspaceConfig, Self::Err>

Parses a string s to return a value of this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more