pub struct Project {
pub root: PathBuf,
pub manifest: PathBuf,
pub lockfile: PathBuf,
pub pkgs_dir: PathBuf,
pub vendored: PathBuf,
}Expand description
An mlua-pkg.toml project: where the manifest, lockfile and vendored deps live.
The pkgs dir follows mlua-pkg’s own rule, evaluated against the manifest’s
directory: MLUA_PKG_DIR env > <root>/target/mlua-pkgs when <root>/target
exists > <root>/.mlua-pkgs.
Fields§
§root: PathBuf§manifest: PathBuf§lockfile: PathBuf§pkgs_dir: PathBuf§vendored: PathBufImplementations§
Source§impl Project
impl Project
Sourcepub fn find(start: &Path) -> Option<Self>
pub fn find(start: &Path) -> Option<Self>
Walk up from start (a file or directory) looking for mlua-pkg.toml.
Sourcepub fn at(root: &Path) -> Self
pub fn at(root: &Path) -> Self
Project rooted at root (must contain mlua-pkg.toml; not checked here).
Sourcepub fn teal_resolver(&self) -> Result<TealResolver, InitError>
pub fn teal_resolver(&self) -> Result<TealResolver, InitError>
Resolver for .tl / .d.tl inside vendored deps (symlink-aware, like
VendoredResolver). Creates the vendored dir if it does not exist yet.
Sourcepub fn vendored_resolver(&self) -> Result<VendoredResolver>
pub fn vendored_resolver(&self) -> Result<VendoredResolver>
mlua-pkg’s own resolver for plain .lua inside vendored deps.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnsafeUnpin for Project
impl UnwindSafe for Project
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,
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