pub struct ExportCx {Show 18 fields
pub target: String,
pub profile: String,
pub root: PathBuf,
pub workspace: PathBuf,
pub target_dir: PathBuf,
pub out: PathBuf,
pub shown: String,
pub release: bool,
pub package: String,
pub bin: String,
pub version: String,
pub title: String,
pub game: Vec<Work>,
pub web: Option<Web>,
pub app: Option<AppPart>,
pub features: Vec<String>,
pub turned_on: Vec<String>,
pub beside: Vec<Beside>,
}Expand description
What an exporter works from.
Fields§
§target: StringThe target.
profile: StringIts profile.
root: PathBufThe project’s root.
workspace: PathBufThe root of the workspace it builds in.
target_dir: PathBufCargo’s target folder.
out: PathBufThe export’s folder, made.
shown: StringThe export’s folder as the game shows it.
release: boolWhether it is a release build.
package: StringThe game’s package.
bin: StringThe program it builds.
version: StringThe game’s version: shuyi.ron’s app.version when it sets one,
else the package’s.
title: StringThe game’s title, for NOTICES.txt.
game: Vec<Work>The game’s own works for NOTICES.txt.
web: Option<Web>The game’s web build, if it has one.
app: Option<AppPart>Who the game is, if shuyi.ron says.
features: Vec<String>The cargo features of the game’s package.
turned_on: Vec<String>The features its build turns on.
beside: Vec<Beside>What ships beside the program.
Implementations§
Source§impl ExportCx
impl ExportCx
Sourcepub fn of(
project: &Project,
exporter: &dyn Exporter,
input: &ExportInput,
) -> Result<Self, ExportError>
pub fn of( project: &Project, exporter: &dyn Exporter, input: &ExportInput, ) -> Result<Self, ExportError>
The context of exporting project with exporter as input
asks: the folder made, the game’s package found with its version
and program (cargo metadata --no-deps).
Sourcepub fn base(&self) -> String
pub fn base(&self) -> String
The package’s name without its extension:
<program>-<version>-<target>.
Sourcepub fn cargo_args(&self, triple: &str) -> Vec<String>
pub fn cargo_args(&self, triple: &str) -> Vec<String>
cargo build’s arguments for the program and triple.
Sourcepub fn artifact(&self, triple: &str) -> PathBuf
pub fn artifact(&self, triple: &str) -> PathBuf
The path of the program cargo builds for triple.
Sourcepub fn search(&self, file: &Path) -> Result<(), ExportError>
pub fn search(&self, file: &Path) -> Result<(), ExportError>
Refuses file if it holds a path of the build machine (a release
build only).
Sourcepub fn build(
&self,
triple: &str,
keep_debug: bool,
) -> Result<PathBuf, ExportError>
pub fn build( &self, triple: &str, keep_debug: bool, ) -> Result<PathBuf, ExportError>
Builds the program for triple, with its line tables kept and not
stripped if keep_debug and it is a release build, and returns the
program’s path.
Sourcepub fn size(&self, file: &Path) -> Result<FileSize, ExportError>
pub fn size(&self, file: &Path) -> Result<FileSize, ExportError>
file’s size, named from the export’s folder.
Sourcepub fn report(
&self,
package: &str,
sizes: Vec<FileSize>,
signing: Signing,
debug: Option<String>,
) -> ExportReport
pub fn report( &self, package: &str, sizes: Vec<FileSize>, signing: Signing, debug: Option<String>, ) -> ExportReport
The report of a package package made from folder (both in the
export’s folder), with sizes and signing.
Sourcepub fn copy_beside(
&self,
place: &dyn Fn(bool) -> PathBuf,
) -> Result<Vec<FileSize>, ExportError>
pub fn copy_beside( &self, place: &dyn Fn(bool) -> PathBuf, ) -> Result<Vec<FileSize>, ExportError>
Copies what ships beside the program, each into the folder place
picks for it from whether it is a folder, under its name there, and
returns what it copied. A name the package already holds is refused.
Sourcepub fn mark_beside(&self, report: &ExportReport, shipped: &mut Shipped)
pub fn mark_beside(&self, report: &ExportReport, shipped: &mut Shipped)
Says in shipped that what report lists as shipped beside the
program is the game’s own, for the exposure report.
Sourcepub fn native_notices(
&self,
triple: &str,
dir: &Path,
) -> Result<(), ExportError>
pub fn native_notices( &self, triple: &str, dir: &Path, ) -> Result<(), ExportError>
Writes NOTICES.txt into dir for a native build for triple:
the crates compiled in, the engine’s files they compile in, and the
game’s own works.
Trait Implementations§
impl Eq for ExportCx
impl StructuralPartialEq for ExportCx
Auto Trait Implementations§
impl Freeze for ExportCx
impl RefUnwindSafe for ExportCx
impl Send for ExportCx
impl Sync for ExportCx
impl Unpin for ExportCx
impl UnsafeUnpin for ExportCx
impl UnwindSafe for ExportCx
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.