pub struct ProjectConfig {
pub publish: PublishConfig,
pub build: Option<BuildConfig>,
pub bundle: Option<BundleConfig>,
pub routing: DeployConfig,
}Expand description
Project configuration, loaded from project.cfg (RON) in the project folder.
Read by the client commands (sync, build, bundle, validate).
Everything is optional; a missing file is the default.
Fields§
§publish: PublishConfigWhere and how to publish this project.
build: Option<BuildConfig>Optional build step run before sync.
bundle: Option<BundleConfig>Optional embedded-bundler step (bundler feature).
routing: DeployConfigDeploy-scoped routing/handlers config. Folded into the deployment
manifest at sync (so it is atomic with the content and rolls back with
it). The bulk of a project’s config — redirects, rewrites, headers,
handlers, consumers, crons, streams.
Implementations§
Source§impl ProjectConfig
impl ProjectConfig
Sourcepub fn parse(text: &str) -> Result<Self, ConfigError>
pub fn parse(text: &str) -> Result<Self, ConfigError>
Parse a project.cfg document (RON). The routing section is
compile-checked (route patterns, cron schedules, imports) so a bad config
fails fast.
Sourcepub fn load(path: &Path) -> Result<Self, ConfigError>
pub fn load(path: &Path) -> Result<Self, ConfigError>
Load from path (RON). A missing file yields the default config.
Trait Implementations§
Source§impl Debug for ProjectConfig
impl Debug for ProjectConfig
Source§impl Default for ProjectConfig
impl Default for ProjectConfig
Source§fn default() -> ProjectConfig
fn default() -> ProjectConfig
Source§impl<'de> Deserialize<'de> for ProjectConfigwhere
ProjectConfig: Default,
impl<'de> Deserialize<'de> for ProjectConfigwhere
ProjectConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ProjectConfig
impl RefUnwindSafe for ProjectConfig
impl Send for ProjectConfig
impl Sync for ProjectConfig
impl Unpin for ProjectConfig
impl UnsafeUnpin for ProjectConfig
impl UnwindSafe for ProjectConfig
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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