pub struct PartialProjectToml { /* private fields */ }Expand description
The lux.toml file for a project.
The only required fields are package and build, which are required to build a project using lux build.
The rest of the fields are optional, but are required to build a rockspec.
Implementations§
Source§impl PartialProjectToml
impl PartialProjectToml
Sourcepub fn lua(&self) -> Option<&VersionReq>
pub fn lua(&self) -> Option<&VersionReq>
This project’s Lua version requirement, if any
Sourcepub fn into_local(
&self,
) -> Result<LocalProjectToml, LocalProjectTomlValidationError>
pub fn into_local( &self, ) -> Result<LocalProjectToml, LocalProjectTomlValidationError>
Convert the PartialProjectToml struct into a LocalProjectToml struct, making
it ready to be used for building a project.
Sourcepub fn into_remote(
&self,
specrev: Option<SpecRev>,
) -> Result<RemoteProjectToml, RemoteProjectTomlValidationError>
pub fn into_remote( &self, specrev: Option<SpecRev>, ) -> Result<RemoteProjectToml, RemoteProjectTomlValidationError>
Convert the PartialProjectToml struct into a RemoteProjectToml struct, making
it ready to be serialized into a rockspec.
A source must be provided for the rockspec to be valid.
Sourcepub fn into_remote_with_version(
&self,
version: Option<Version>,
specrev: Option<SpecRev>,
) -> Result<RemoteProjectToml, RemoteProjectTomlValidationError>
pub fn into_remote_with_version( &self, version: Option<Version>, specrev: Option<SpecRev>, ) -> Result<RemoteProjectToml, RemoteProjectTomlValidationError>
Like Self::into_remote but generates the rockspec for a specified
target version.
pub fn package(&self) -> &Name
Sourcepub fn version(&self) -> Result<Version, GenerateVersionError>
pub fn version(&self) -> Result<Version, GenerateVersionError>
Returns the current package version, which may be generated from a template
Sourcepub fn merge(self, other: PartialLuaRockspec) -> Self
pub fn merge(self, other: PartialLuaRockspec) -> Self
Merge the ProjectToml struct with an unvalidated LuaRockspec.
The final merged struct can then be validated.
Trait Implementations§
Source§impl Clone for PartialProjectToml
impl Clone for PartialProjectToml
Source§impl Debug for PartialProjectToml
impl Debug for PartialProjectToml
Source§impl<'de> Deserialize<'de> for PartialProjectToml
impl<'de> Deserialize<'de> for PartialProjectToml
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>,
Source§impl HasIntegrity for PartialProjectToml
impl HasIntegrity for PartialProjectToml
Source§impl LuaVersionCompatibility for PartialProjectToml
impl LuaVersionCompatibility for PartialProjectToml
Source§fn validate_lua_version(
&self,
version: &LuaVersion,
) -> Result<(), LuaVersionError>
fn validate_lua_version( &self, version: &LuaVersion, ) -> Result<(), LuaVersionError>
Source§fn validate_lua_version_from_config(
&self,
config: &Config,
) -> Result<(), LuaVersionError>
fn validate_lua_version_from_config( &self, config: &Config, ) -> Result<(), LuaVersionError>
Source§fn lua_version_matches(
&self,
config: &Config,
) -> Result<LuaVersion, LuaVersionError>
fn lua_version_matches( &self, config: &Config, ) -> Result<LuaVersion, LuaVersionError>
Source§fn supports_lua_version(&self, lua_version: &LuaVersion) -> bool
fn supports_lua_version(&self, lua_version: &LuaVersion) -> bool
Source§fn lua_version(&self) -> Option<LuaVersion>
fn lua_version(&self) -> Option<LuaVersion>
Auto Trait Implementations§
impl Freeze for PartialProjectToml
impl RefUnwindSafe for PartialProjectToml
impl Send for PartialProjectToml
impl Sync for PartialProjectToml
impl Unpin for PartialProjectToml
impl UnsafeUnpin for PartialProjectToml
impl UnwindSafe for PartialProjectToml
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreimpl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
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,
impl<T> Read<Exclusive, BecauseExclusive> 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
WrappingSpan::make_wrapped to wrap an AST node in a span.