pub struct Manifest {
pub package: Package,
pub dependencies: HashMap<String, DependencySpec>,
pub test: Option<TestSection>,
pub web: Option<WebSection>,
}Expand description
Project manifest (Largo.toml).
The root structure of a LOGOS project manifest, containing package metadata and dependency specifications.
Fields§
§package: PackagePackage metadata section.
dependencies: HashMap<String, DependencySpec>Map of dependency names to their specifications.
test: Option<TestSection>Test-framework configuration ([test]) — the discipline ledger’s
budgets. Budgets should
only ever shrink.
web: Option<WebSection>Web-site configuration ([web]) — whether a page ships the built-in theme.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn load(dir: &Path) -> Result<Self, ManifestError>
pub fn load(dir: &Path) -> Result<Self, ManifestError>
Load manifest from a directory (looks for Largo.toml)
Sourcepub fn shell_theme(&self) -> ShellTheme
pub fn shell_theme(&self) -> ShellTheme
Whether a built page carries the framework’s theme — the ONE rule every page
composition site reads, so a project’s [web] theme = false reaches all of them alike.
Sourcepub fn to_toml(&self) -> Result<String, ManifestError>
pub fn to_toml(&self) -> Result<String, ManifestError>
Serialize to TOML string
Sourcepub fn resolve_dependencies(
&self,
project_root: &Path,
) -> Result<Vec<ResolvedDep>, DependencyError>
pub fn resolve_dependencies( &self, project_root: &Path, ) -> Result<Vec<ResolvedDep>, DependencyError>
Resolve every LINKABLE [dependencies] declaration against project_root
into a canonicalized ResolvedDep.
Only PATH and exactly-pinned GIT dependencies are linkable from the local
closure — a plain version string (foo = "1.2") or a logos: intrinsic is
resolved elsewhere (the AOT ## Requires path / the built-in prelude) and
is skipped here, never treated as an error. This is what keeps the local
closure registry-free: resolve_dependencies reaches only the filesystem.
Enforced invariants:
- A
gitdependency MUST carry an exact 40-hex commitrev(DependencyError::FloatingGit/DependencyError::MalformedRev). - A
path/gitdependency’s resolved root MUST exist (DependencyError::Missing).
Determinism: names are resolved in sorted order, so the returned vec is
stable regardless of the manifest’s HashMap iteration order.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
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 Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin for Manifest
impl UnwindSafe for Manifest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.