pub struct PartialProjectToml { /* private fields */ }
Expand description
The lux.toml
file.
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 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,
) -> Result<RemoteProjectToml, RemoteProjectTomlValidationError>
pub fn into_remote( &self, ) -> 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.
pub fn package(&self) -> &PackageName
Sourcepub fn version(&self) -> Result<PackageVersion, GenerateVersionError>
pub fn version(&self) -> Result<PackageVersion, 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§fn clone(&self) -> PartialProjectToml
fn clone(&self) -> PartialProjectToml
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasIntegrity for PartialProjectToml
impl HasIntegrity for PartialProjectToml
Source§impl LuaVersionCompatibility for PartialProjectToml
impl LuaVersionCompatibility for PartialProjectToml
Source§fn validate_lua_version(&self, config: &Config) -> Result<(), LuaVersionError>
fn validate_lua_version(&self, config: &Config) -> Result<(), LuaVersionError>
Ensures that the rockspec is compatible with the lua version established in the config.
Returns an error if the rockspec is not compatible.
Source§fn lua_version_matches(
&self,
config: &Config,
) -> Result<LuaVersion, LuaVersionError>
fn lua_version_matches( &self, config: &Config, ) -> Result<LuaVersion, LuaVersionError>
Ensures that the rockspec is compatible with the lua version established in the config,
and returns the lua version from the config if it is compatible.
Source§fn supports_lua_version(&self, lua_version: &LuaVersion) -> bool
fn supports_lua_version(&self, lua_version: &LuaVersion) -> bool
Checks if the rockspec supports the given lua version.
Source§fn lua_version(&self) -> Option<LuaVersion>
fn lua_version(&self) -> Option<LuaVersion>
Returns the lua version required by the rockspec.
Source§impl UserData for PartialProjectToml
impl UserData for PartialProjectToml
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 PartialProjectToml
impl RefUnwindSafe for PartialProjectToml
impl Send for PartialProjectToml
impl Sync for PartialProjectToml
impl Unpin for PartialProjectToml
impl UnwindSafe for PartialProjectToml
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
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.