pub struct Project { /* private fields */ }Implementations§
Source§impl Project
impl Project
pub fn current() -> Result<Option<Self>, ProjectError>
pub fn current_or_err() -> Result<Self, ProjectError>
pub fn from_exact(start: impl AsRef<Path>) -> Result<Option<Self>, ProjectError>
pub fn from(start: impl AsRef<Path>) -> Result<Option<Self>, ProjectError>
Sourcepub fn luarc_path(&self) -> PathBuf
pub fn luarc_path(&self) -> PathBuf
Get the .luarc.json or .emmyrc.json path.
Sourcepub fn extra_rockspec_path(&self) -> PathBuf
pub fn extra_rockspec_path(&self) -> PathBuf
Get the extra.rockspec path.
Sourcepub fn lockfile_path(&self) -> PathBuf
pub fn lockfile_path(&self) -> PathBuf
Get the lux.lock lockfile path.
Sourcepub fn lockfile(&self) -> Result<ProjectLockfile<ReadOnly>, ProjectError>
pub fn lockfile(&self) -> Result<ProjectLockfile<ReadOnly>, ProjectError>
Get the lux.lock lockfile in the project root.
Sourcepub fn try_lockfile(
&self,
) -> Result<Option<ProjectLockfile<ReadOnly>>, ProjectError>
pub fn try_lockfile( &self, ) -> Result<Option<ProjectLockfile<ReadOnly>>, ProjectError>
Get the lux.lock lockfile in the project root, if present.
pub fn root(&self) -> &ProjectRoot
pub fn toml(&self) -> &PartialProjectToml
pub fn local_rockspec(&self) -> Result<LocalLuaRockspec, IntoLocalRockspecError>
pub fn remote_rockspec( &self, specrev: Option<SpecRev>, ) -> Result<RemoteLuaRockspec, IntoRemoteRockspecError>
pub fn extra_rockspec( &self, ) -> Result<Option<PartialLuaRockspec>, PartialRockspecError>
pub fn tree(&self, config: &Config) -> Result<Tree, ProjectTreeError>
pub fn test_tree(&self, config: &Config) -> Result<Tree, ProjectTreeError>
pub fn build_tree(&self, config: &Config) -> Result<Tree, ProjectTreeError>
pub fn lua_version( &self, config: &Config, ) -> Result<LuaVersion, LuaVersionError>
pub async fn add( &mut self, dependencies: DependencyType<PackageReq>, package_db: &RemotePackageDB, ) -> Result<(), ProjectEditError>
pub async fn add_git( &mut self, dependencies: LuaDependencyType<RemoteGitUrlShorthand>, ) -> Result<(), ProjectEditError>
pub async fn remove( &mut self, dependencies: DependencyType<PackageName>, ) -> Result<(), ProjectEditError>
pub async fn upgrade( &mut self, dependencies: LuaDependencyType<PackageName>, package_db: &RemotePackageDB, ) -> Result<(), ProjectEditError>
pub async fn upgrade_all( &mut self, package_db: &RemotePackageDB, ) -> Result<(), ProjectEditError>
pub async fn set_pinned_state( &mut self, dependencies: LuaDependencyType<PackageName>, pin: PinnedState, ) -> Result<(), PinError>
pub fn project_files(&self) -> Vec<PathBuf>
Trait Implementations§
Source§impl UserData for Project
impl UserData for Project
Source§fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
Adds custom methods and operators specific to this userdata.
Source§fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
Adds custom fields specific to this userdata.
Source§fn register(registry: &mut UserDataRegistry<Self>)
fn register(registry: &mut UserDataRegistry<Self>)
Registers this type for use in Lua. Read more
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin 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> 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>
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 moreSource§impl<T> IntoLuaMulti for Twhere
T: IntoLua,
impl<T> IntoLuaMulti for Twhere
T: IntoLua,
Source§fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
Performs the conversion.
unsafe fn push_into_stack_multi(self, lua: &RawLua) -> Result<i32, Error>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.