pub struct AppManifest {
pub name: String,
pub paths: AppPaths,
pub file: Option<PathBuf>,
pub warnings: Vec<String>,
}Expand description
rws.app.toml, parsed: the app’s name and where each part of it lives.
Default is the conventional layout with no name.
Fields§
§name: String[app] name (or a top-level name). AppManifest::load falls back
to the [package] name of the project’s Cargo.toml, then to the
directory’s name; [AppManifest::from_str] leaves it empty.
paths: AppPaths[paths], the layout’s defaults for every key not given.
file: Option<PathBuf>The file it was read from — None when AppManifest::load found
none (the conventional layout) or for [AppManifest::from_str].
warnings: Vec<String>Keys and tables the parser doesn’t know, as line N: … notes.
Implementations§
Source§impl AppManifest
impl AppManifest
Sourcepub fn conventional(name: impl Into<String>) -> AppManifest
pub fn conventional(name: impl Into<String>) -> AppManifest
The conventional layout for an app called name.
Sourcepub fn parse(text: &str) -> Result<AppManifest, ManifestError>
pub fn parse(text: &str) -> Result<AppManifest, ManifestError>
Parse a manifest’s text (also text.parse::<AppManifest>()).
Tables [app] (name) and [paths] (the ROLES); values are
strings; paths are relative to the project root and stay inside it
(no leading /, no drive letter, no ..). Unknown keys and tables
become Self::warnings.
Sourcepub fn load(dir: impl AsRef<Path>) -> Result<AppManifest, ManifestError>
pub fn load(dir: impl AsRef<Path>) -> Result<AppManifest, ManifestError>
The manifest of the project in dir: its rws.app.toml, or the
conventional layout when there is none. The name falls back to
Cargo.toml’s [package] name, then to the directory’s name.
Trait Implementations§
Source§impl Clone for AppManifest
impl Clone for AppManifest
Source§fn clone(&self) -> AppManifest
fn clone(&self) -> AppManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AppManifest
impl Debug for AppManifest
Source§impl Default for AppManifest
impl Default for AppManifest
Source§fn default() -> AppManifest
fn default() -> AppManifest
impl Eq for AppManifest
Source§impl FromStr for AppManifest
impl FromStr for AppManifest
Source§type Err = ManifestError
type Err = ManifestError
Source§fn from_str(text: &str) -> Result<AppManifest, ManifestError>
fn from_str(text: &str) -> Result<AppManifest, ManifestError>
s to return a value of this type. Read moreSource§impl PartialEq for AppManifest
impl PartialEq for AppManifest
impl StructuralPartialEq for AppManifest
Auto Trait Implementations§
impl Freeze for AppManifest
impl RefUnwindSafe for AppManifest
impl Send for AppManifest
impl Sync for AppManifest
impl Unpin for AppManifest
impl UnsafeUnpin for AppManifest
impl UnwindSafe for AppManifest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
map-response-body only.Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
trace only.Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
trace only.