pub struct Manifest {
pub package: Package,
pub deps: HashMap<String, Dep>,
}Expand description
Parsed mlua-pkg.toml.
Shared schema for consumer and author manifests. The deps map is empty
for author-side manifests (packages that are depended upon, not consumers).
Unknown top-level keys cause an immediate parse error
(#[serde(deny_unknown_fields)]).
Fields§
§package: Package[package] section — required in all manifests.
deps: HashMap<String, Dep>[deps] table — optional; absent in author-side manifests.
Keys are the local package alias used in require().
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn from_path(path: impl AsRef<Path>) -> Result<Self, PkgError>
pub fn from_path(path: impl AsRef<Path>) -> Result<Self, PkgError>
Read and parse a mlua-pkg.toml file at path.
Performs post-parse validation after TOML deserialization:
- Each
[deps]entry must specify at most one oftag,rev,branch.
§Errors
PkgError::Io— file cannot be read.PkgError::ManifestParse— TOML is syntactically invalid, a required field is missing, an unknown field is present, or a type mismatch occurs.PkgError::Validation— post-parse invariants are violated (e.g.tagandrevboth set on the same dependency).
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Manifest
impl StructuralPartialEq for Manifest
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.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