6355 lines
296 KiB
Rust
6355 lines
296 KiB
Rust
#![feature(prelude_import)]
|
|
#![feature(min_specialization)]
|
|
#[prelude_import]
|
|
use std::prelude::rust_2024::*;
|
|
#[macro_use]
|
|
extern crate std;
|
|
|
|
pub mod collection {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use std::{
|
|
borrow::Cow, ffi::{OsStr, OsString},
|
|
fmt::Display, ops::{Deref, DerefMut},
|
|
path::PathBuf,
|
|
};
|
|
use derive_more::Display;
|
|
use osstr_traits::{OsDisplay, ToOsString};
|
|
type OsStrDisplay<'a> = std::ffi::os_str::Display<'a>;
|
|
type PathDisplay<'a> = std::path::Display<'a>;
|
|
pub struct DelimitedVec<T, const D : char = ' '>(Vec<T>);
|
|
#[automatically_derived]
|
|
impl<T: ::core::clone::Clone, const D : char> ::core::clone::Clone for
|
|
DelimitedVec<T, D> {
|
|
#[inline]
|
|
fn clone(&self) -> DelimitedVec<T, D> {
|
|
DelimitedVec(::core::clone::Clone::clone(&self.0))
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::fmt::Debug, const D : char> ::core::fmt::Debug for
|
|
DelimitedVec<T, D> {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"DelimitedVec", &&self.0)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<T, const D : char> ::core::marker::StructuralPartialEq for
|
|
DelimitedVec<T, D> {
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::cmp::PartialEq, const D : char> ::core::cmp::PartialEq for
|
|
DelimitedVec<T, D> {
|
|
#[inline]
|
|
fn eq(&self, other: &DelimitedVec<T, D>) -> bool { self.0 == other.0 }
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::cmp::Eq, const D : char> ::core::cmp::Eq for
|
|
DelimitedVec<T, D> {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<Vec<T>>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::cmp::PartialOrd, const D : char> ::core::cmp::PartialOrd
|
|
for DelimitedVec<T, D> {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &DelimitedVec<T, D>)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::cmp::Ord, const D : char> ::core::cmp::Ord for
|
|
DelimitedVec<T, D> {
|
|
#[inline]
|
|
fn cmp(&self, other: &DelimitedVec<T, D>) -> ::core::cmp::Ordering {
|
|
::core::cmp::Ord::cmp(&self.0, &other.0)
|
|
}
|
|
}
|
|
impl<T: OsDisplay, const D : char> OsDisplay for DelimitedVec<T, D> {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
let mut first = true;
|
|
for item in &self.0 {
|
|
if !first { f.write_os_str(&D.to_os_string())?; }
|
|
item.fmt_os(f)?;
|
|
first = false;
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
impl<T: Display, const D : char> Display for DelimitedVec<T, D> {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
let mut first = true;
|
|
for item in &self.0 {
|
|
if !first { f.write_fmt(format_args!("{0}", D))?; }
|
|
f.write_fmt(format_args!("{0}", item))?;
|
|
first = false;
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
impl<A, const D : char> FromIterator<A> for DelimitedVec<A, D> {
|
|
fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self {
|
|
Self(iter.into_iter().collect())
|
|
}
|
|
}
|
|
impl<'a, const D : char> From<&'a Vec<PathBuf>> for
|
|
DelimitedVec<PathDisplay<'a>, D> {
|
|
fn from(value: &'a Vec<PathBuf>) -> Self {
|
|
let iter = value.iter().map(|s| s.display());
|
|
Self::from_iter(iter)
|
|
}
|
|
}
|
|
impl<'a, const D : char> From<&'a Vec<OsString>> for
|
|
DelimitedVec<OsStrDisplay<'a>, D> {
|
|
fn from(value: &'a Vec<OsString>) -> Self {
|
|
let iter = value.iter().map(|s| s.display());
|
|
Self::from_iter(iter)
|
|
}
|
|
}
|
|
pub struct CommandArgs<T>(Vec<T>);
|
|
#[automatically_derived]
|
|
impl<T: ::core::clone::Clone> ::core::clone::Clone for CommandArgs<T> {
|
|
#[inline]
|
|
fn clone(&self) -> CommandArgs<T> {
|
|
CommandArgs(::core::clone::Clone::clone(&self.0))
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::fmt::Debug> ::core::fmt::Debug for CommandArgs<T> {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"CommandArgs", &&self.0)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<T> ::core::marker::StructuralPartialEq for CommandArgs<T> { }
|
|
#[automatically_derived]
|
|
impl<T: ::core::cmp::PartialEq> ::core::cmp::PartialEq for CommandArgs<T>
|
|
{
|
|
#[inline]
|
|
fn eq(&self, other: &CommandArgs<T>) -> bool { self.0 == other.0 }
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::cmp::Eq> ::core::cmp::Eq for CommandArgs<T> {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<Vec<T>>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::cmp::PartialOrd> ::core::cmp::PartialOrd for
|
|
CommandArgs<T> {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &CommandArgs<T>)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<T: ::core::cmp::Ord> ::core::cmp::Ord for CommandArgs<T> {
|
|
#[inline]
|
|
fn cmp(&self, other: &CommandArgs<T>) -> ::core::cmp::Ordering {
|
|
::core::cmp::Ord::cmp(&self.0, &other.0)
|
|
}
|
|
}
|
|
impl<T: OsDisplay> OsDisplay for CommandArgs<T> {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
let mut first = true;
|
|
for item in &self.0 {
|
|
if !first { f.write_os_str(OsStr::new(" "))?; }
|
|
item.fmt_os(f)?;
|
|
first = false;
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
impl<T: Display> Display for CommandArgs<T> {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
let mut first = true;
|
|
for item in &self.0 {
|
|
if !first { f.write_fmt(format_args!(" "))?; }
|
|
f.write_fmt(format_args!("{0}", item))?;
|
|
first = false;
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
impl<T> Default for CommandArgs<T> {
|
|
fn default() -> Self { Self(Vec::new()) }
|
|
}
|
|
impl<T> Deref for CommandArgs<T> {
|
|
type Target = Vec<T>;
|
|
fn deref(&self) -> &Self::Target { &self.0 }
|
|
}
|
|
impl<T> DerefMut for CommandArgs<T> {
|
|
fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 }
|
|
}
|
|
impl<A> FromIterator<A> for CommandArgs<A> {
|
|
fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self {
|
|
Self(iter.into_iter().collect())
|
|
}
|
|
}
|
|
impl<T> IntoIterator for CommandArgs<T> {
|
|
type Item = T;
|
|
type IntoIter = <Vec<T> as IntoIterator>::IntoIter;
|
|
fn into_iter(self) -> Self::IntoIter { self.0.into_iter() }
|
|
}
|
|
#[display("{} {}", command.display(), args)]
|
|
pub struct Command<'a, T> {
|
|
command: Cow<'a, OsStr>,
|
|
args: CommandArgs<T>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'a, T: ::core::clone::Clone> ::core::clone::Clone for Command<'a, T>
|
|
{
|
|
#[inline]
|
|
fn clone(&self) -> Command<'a, T> {
|
|
Command {
|
|
command: ::core::clone::Clone::clone(&self.command),
|
|
args: ::core::clone::Clone::clone(&self.args),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'a, T: ::core::fmt::Debug> ::core::fmt::Debug for Command<'a, T> {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field2_finish(f, "Command",
|
|
"command", &self.command, "args", &&self.args)
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl<'a, T> derive_more::core::fmt::Display for Command<'a, T> where
|
|
CommandArgs<T>: derive_more::core::fmt::Display {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
let command = &self.command;
|
|
let args = &self.args;
|
|
__derive_more_f.write_fmt(format_args!("{0} {1}",
|
|
command.display(), args))
|
|
}
|
|
}
|
|
impl<'a, T> Command<'a, T> {
|
|
pub fn new(command: impl Into<Cow<'a, OsStr>>) -> Self {
|
|
Self { command: command.into(), args: CommandArgs::default() }
|
|
}
|
|
pub fn arg(&mut self, arg: T) { self.args.push(arg); }
|
|
}
|
|
impl<'a, T: AsRef<OsStr>> Command<'a, T> {
|
|
pub fn into_os_command(self) -> std::process::Command {
|
|
let mut cmd = std::process::Command::new(self.command);
|
|
cmd.args(self.args);
|
|
cmd
|
|
}
|
|
}
|
|
}
|
|
pub mod config {
|
|
use std::{borrow::Cow, env, path::{Path, PathBuf}};
|
|
use confique::Config;
|
|
use directories::ProjectDirs;
|
|
use serde::{Deserialize, Deserializer, Serialize};
|
|
use crate::error::{Error, ShellExpansionError};
|
|
trait Fallback: Config {
|
|
fn fallback()
|
|
-> <Self as Config>::Partial;
|
|
}
|
|
fn project_dir() -> Option<ProjectDirs> {
|
|
ProjectDirs::from("cafe", "kitsu", "TormentNexus")
|
|
}
|
|
fn expand_tilde<'a>(path: impl Into<Cow<'a, Path>>)
|
|
-> Result<Cow<'a, Path>, ShellExpansionError> {
|
|
let path = path.into();
|
|
let into_err = || ShellExpansionError::new("~", path.to_str());
|
|
if !path.starts_with("~") {
|
|
Ok(path)
|
|
} else if path == Path::new("~") {
|
|
env::home_dir().map(Cow::Owned).ok_or_else(into_err)
|
|
} else {
|
|
let mut home_dir = env::home_dir().ok_or_else(into_err)?;
|
|
if home_dir == Path::new("/") {
|
|
let stripped =
|
|
path.strip_prefix("~").map_err(|_e| into_err())?;
|
|
Ok(Cow::Owned(stripped.into()))
|
|
} else {
|
|
home_dir.push(path.strip_prefix("~/").map_err(|_e|
|
|
into_err())?);
|
|
Ok(Cow::Owned(home_dir))
|
|
}
|
|
}
|
|
}
|
|
fn deserialize_path<'de, D: Deserializer<'de>>(de: D)
|
|
-> Result<PathBuf, D::Error> {
|
|
let path = PathBuf::deserialize(de)?;
|
|
if let Ok(expanded_path) = expand_tilde(&path) {
|
|
Ok(expanded_path.into())
|
|
} else { Ok(path) }
|
|
}
|
|
pub struct EditorCfg {
|
|
#[config(deserialize_with = deserialize_path, env = "EDITOR_PATH")]
|
|
pub path: PathBuf,
|
|
}
|
|
#[automatically_derived]
|
|
impl confique::Config for EditorCfg {
|
|
type Partial = confique_partial_editor_cfg::PartialEditorCfg;
|
|
fn from_partial(partial: Self::Partial)
|
|
-> std::result::Result<Self, confique::Error> {
|
|
let out =
|
|
Self {
|
|
path: confique::internal::unwrap_or_missing_value_err(partial.path,
|
|
"path")?,
|
|
};
|
|
std::result::Result::Ok(out)
|
|
}
|
|
const META: confique::meta::Meta =
|
|
confique::meta::Meta {
|
|
name: "EditorCfg",
|
|
doc: &[],
|
|
fields: &[confique::meta::Field {
|
|
name: "path",
|
|
doc: &[],
|
|
kind: confique::meta::FieldKind::Leaf {
|
|
env: std::option::Option::Some("EDITOR_PATH"),
|
|
kind: confique::meta::LeafKind::Required {
|
|
default: std::option::Option::None,
|
|
},
|
|
},
|
|
}],
|
|
};
|
|
}
|
|
#[doc =
|
|
"*Generated* by `confique`: helpers to implement `Config` for [`EditorCfg`].\n\nDo not use directly! Only use via the `Config` and `Partial` traits and what's explained in the confique documentation.\n Any other parts of this module cannot be relied on and are not part of the semver guarantee of `confique`."]
|
|
pub mod confique_partial_editor_cfg {
|
|
#![allow(missing_docs)]
|
|
use super::*;
|
|
#[serde(crate = "confique::serde")]
|
|
pub struct PartialEditorCfg {
|
|
#[serde(default, deserialize_with =
|
|
"__confique_deserialize_some_path")]
|
|
pub path: std::option::Option<PathBuf>,
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes,
|
|
unused_qualifications, clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
use confique::serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> confique::serde::Deserialize<'de> for
|
|
PartialEditorCfg {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> confique::serde::__private::Result<Self, __D::Error>
|
|
where __D: confique::serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __field0, __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
0u64 => _serde::__private::Ok(__Field::__field0),
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
"path" => _serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
b"path" => _serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<PartialEditorCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = PartialEditorCfg;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct PartialEditorCfg")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, mut __seq: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
let __field0 =
|
|
match {
|
|
#[doc(hidden)]
|
|
struct __DeserializeWith<'de> {
|
|
value: std::option::Option<PathBuf>,
|
|
phantom: _serde::__private::PhantomData<PartialEditorCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for
|
|
__DeserializeWith<'de> {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::__private::Ok(__DeserializeWith {
|
|
value: __confique_deserialize_some_path(__deserializer)?,
|
|
phantom: _serde::__private::PhantomData,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
_serde::__private::Option::map(_serde::de::SeqAccess::next_element::<__DeserializeWith<'de>>(&mut __seq)?,
|
|
|__wrap| __wrap.value)
|
|
} {
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
_serde::__private::Default::default(),
|
|
};
|
|
_serde::__private::Ok(PartialEditorCfg { path: __field0 })
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
let mut __field0:
|
|
_serde::__private::Option<std::option::Option<PathBuf>> =
|
|
_serde::__private::None;
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
__Field::__field0 => {
|
|
if _serde::__private::Option::is_some(&__field0) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("path"));
|
|
}
|
|
__field0 =
|
|
_serde::__private::Some({
|
|
#[doc(hidden)]
|
|
struct __DeserializeWith<'de> {
|
|
value: std::option::Option<PathBuf>,
|
|
phantom: _serde::__private::PhantomData<PartialEditorCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for
|
|
__DeserializeWith<'de> {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::__private::Ok(__DeserializeWith {
|
|
value: __confique_deserialize_some_path(__deserializer)?,
|
|
phantom: _serde::__private::PhantomData,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
match _serde::de::MapAccess::next_value::<__DeserializeWith<'de>>(&mut __map)
|
|
{
|
|
_serde::__private::Ok(__wrapper) => __wrapper.value,
|
|
_serde::__private::Err(__err) => {
|
|
return _serde::__private::Err(__err);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
let __field0 =
|
|
match __field0 {
|
|
_serde::__private::Some(__field0) => __field0,
|
|
_serde::__private::None =>
|
|
_serde::__private::Default::default(),
|
|
};
|
|
_serde::__private::Ok(PartialEditorCfg { path: __field0 })
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] = &["path"];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"PartialEditorCfg", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<PartialEditorCfg>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
#[automatically_derived]
|
|
impl confique::Partial for PartialEditorCfg where {
|
|
fn empty() -> Self { Self { path: std::option::Option::None } }
|
|
fn default_values() -> Self {
|
|
Self { path: std::option::Option::None }
|
|
}
|
|
fn from_env() -> std::result::Result<Self, confique::Error> {
|
|
std::result::Result::Ok(Self {
|
|
path: confique::internal::from_env("EDITOR_PATH",
|
|
"EditorCfg::path", deserialize_path)?,
|
|
})
|
|
}
|
|
fn with_fallback(self, fallback: Self) -> Self {
|
|
Self { path: self.path.or(fallback.path) }
|
|
}
|
|
fn is_empty(&self) -> bool { true && self.path.is_none() }
|
|
fn is_complete(&self) -> bool { true && self.path.is_some() }
|
|
}
|
|
fn __confique_deserialize_some_path<'de, D>(deserializer: D)
|
|
-> std::result::Result<std::option::Option<PathBuf>, D::Error>
|
|
where D: confique::serde::Deserializer<'de> {
|
|
deserialize_path(deserializer).map(std::option::Option::Some)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for EditorCfg {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field1_finish(f, "EditorCfg",
|
|
"path", &&self.path)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl _serde::Serialize for EditorCfg {
|
|
fn serialize<__S>(&self, __serializer: __S)
|
|
-> _serde::__private::Result<__S::Ok, __S::Error> where
|
|
__S: _serde::Serializer {
|
|
let mut __serde_state =
|
|
_serde::Serializer::serialize_struct(__serializer,
|
|
"EditorCfg", false as usize + 1)?;
|
|
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
|
|
"path", &self.path)?;
|
|
_serde::ser::SerializeStruct::end(__serde_state)
|
|
}
|
|
}
|
|
};
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for EditorCfg {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __field0, __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
0u64 => _serde::__private::Ok(__Field::__field0),
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
"path" => _serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
b"path" => _serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<EditorCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = EditorCfg;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct EditorCfg")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, mut __seq: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
let __field0 =
|
|
match _serde::de::SeqAccess::next_element::<PathBuf>(&mut __seq)?
|
|
{
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
return _serde::__private::Err(_serde::de::Error::invalid_length(0usize,
|
|
&"struct EditorCfg with 1 element")),
|
|
};
|
|
_serde::__private::Ok(EditorCfg { path: __field0 })
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
let mut __field0: _serde::__private::Option<PathBuf> =
|
|
_serde::__private::None;
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
__Field::__field0 => {
|
|
if _serde::__private::Option::is_some(&__field0) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("path"));
|
|
}
|
|
__field0 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<PathBuf>(&mut __map)?);
|
|
}
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
let __field0 =
|
|
match __field0 {
|
|
_serde::__private::Some(__field0) => __field0,
|
|
_serde::__private::None =>
|
|
_serde::__private::de::missing_field("path")?,
|
|
};
|
|
_serde::__private::Ok(EditorCfg { path: __field0 })
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] = &["path"];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"EditorCfg", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<EditorCfg>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
impl Fallback for EditorCfg {
|
|
fn fallback() -> <Self as Config>::Partial {
|
|
Self::Partial {
|
|
path: project_dir().map(|d|
|
|
d.data_local_dir().join("editors/")),
|
|
}
|
|
}
|
|
}
|
|
pub struct ProjectCfg {
|
|
#[config(deserialize_with = deserialize_path, env =
|
|
"PROJECT_MANIFEST_PATH")]
|
|
pub manifest_path: PathBuf,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for ProjectCfg {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field1_finish(f,
|
|
"ProjectCfg", "manifest_path", &&self.manifest_path)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl confique::Config for ProjectCfg {
|
|
type Partial = confique_partial_project_cfg::PartialProjectCfg;
|
|
fn from_partial(partial: Self::Partial)
|
|
-> std::result::Result<Self, confique::Error> {
|
|
let out =
|
|
Self {
|
|
manifest_path: confique::internal::unwrap_or_missing_value_err(partial.manifest_path,
|
|
"manifest_path")?,
|
|
};
|
|
std::result::Result::Ok(out)
|
|
}
|
|
const META: confique::meta::Meta =
|
|
confique::meta::Meta {
|
|
name: "ProjectCfg",
|
|
doc: &[],
|
|
fields: &[confique::meta::Field {
|
|
name: "manifest_path",
|
|
doc: &[],
|
|
kind: confique::meta::FieldKind::Leaf {
|
|
env: std::option::Option::Some("PROJECT_MANIFEST_PATH"),
|
|
kind: confique::meta::LeafKind::Required {
|
|
default: std::option::Option::None,
|
|
},
|
|
},
|
|
}],
|
|
};
|
|
}
|
|
#[doc =
|
|
"*Generated* by `confique`: helpers to implement `Config` for [`ProjectCfg`].\n\nDo not use directly! Only use via the `Config` and `Partial` traits and what's explained in the confique documentation.\n Any other parts of this module cannot be relied on and are not part of the semver guarantee of `confique`."]
|
|
pub mod confique_partial_project_cfg {
|
|
#![allow(missing_docs)]
|
|
use super::*;
|
|
#[serde(crate = "confique::serde")]
|
|
pub struct PartialProjectCfg {
|
|
#[serde(default, deserialize_with =
|
|
"__confique_deserialize_some_manifest_path")]
|
|
pub manifest_path: std::option::Option<PathBuf>,
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes,
|
|
unused_qualifications, clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
use confique::serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> confique::serde::Deserialize<'de> for
|
|
PartialProjectCfg {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> confique::serde::__private::Result<Self, __D::Error>
|
|
where __D: confique::serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __field0, __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
0u64 => _serde::__private::Ok(__Field::__field0),
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
"manifest_path" => _serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
b"manifest_path" =>
|
|
_serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<PartialProjectCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = PartialProjectCfg;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct PartialProjectCfg")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, mut __seq: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
let __field0 =
|
|
match {
|
|
#[doc(hidden)]
|
|
struct __DeserializeWith<'de> {
|
|
value: std::option::Option<PathBuf>,
|
|
phantom: _serde::__private::PhantomData<PartialProjectCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for
|
|
__DeserializeWith<'de> {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::__private::Ok(__DeserializeWith {
|
|
value: __confique_deserialize_some_manifest_path(__deserializer)?,
|
|
phantom: _serde::__private::PhantomData,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
_serde::__private::Option::map(_serde::de::SeqAccess::next_element::<__DeserializeWith<'de>>(&mut __seq)?,
|
|
|__wrap| __wrap.value)
|
|
} {
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
_serde::__private::Default::default(),
|
|
};
|
|
_serde::__private::Ok(PartialProjectCfg {
|
|
manifest_path: __field0,
|
|
})
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
let mut __field0:
|
|
_serde::__private::Option<std::option::Option<PathBuf>> =
|
|
_serde::__private::None;
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
__Field::__field0 => {
|
|
if _serde::__private::Option::is_some(&__field0) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("manifest_path"));
|
|
}
|
|
__field0 =
|
|
_serde::__private::Some({
|
|
#[doc(hidden)]
|
|
struct __DeserializeWith<'de> {
|
|
value: std::option::Option<PathBuf>,
|
|
phantom: _serde::__private::PhantomData<PartialProjectCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for
|
|
__DeserializeWith<'de> {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::__private::Ok(__DeserializeWith {
|
|
value: __confique_deserialize_some_manifest_path(__deserializer)?,
|
|
phantom: _serde::__private::PhantomData,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
match _serde::de::MapAccess::next_value::<__DeserializeWith<'de>>(&mut __map)
|
|
{
|
|
_serde::__private::Ok(__wrapper) => __wrapper.value,
|
|
_serde::__private::Err(__err) => {
|
|
return _serde::__private::Err(__err);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
let __field0 =
|
|
match __field0 {
|
|
_serde::__private::Some(__field0) => __field0,
|
|
_serde::__private::None =>
|
|
_serde::__private::Default::default(),
|
|
};
|
|
_serde::__private::Ok(PartialProjectCfg {
|
|
manifest_path: __field0,
|
|
})
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] = &["manifest_path"];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"PartialProjectCfg", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<PartialProjectCfg>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
#[automatically_derived]
|
|
impl confique::Partial for PartialProjectCfg where {
|
|
fn empty() -> Self {
|
|
Self { manifest_path: std::option::Option::None }
|
|
}
|
|
fn default_values() -> Self {
|
|
Self { manifest_path: std::option::Option::None }
|
|
}
|
|
fn from_env() -> std::result::Result<Self, confique::Error> {
|
|
std::result::Result::Ok(Self {
|
|
manifest_path: confique::internal::from_env("PROJECT_MANIFEST_PATH",
|
|
"ProjectCfg::manifest_path", deserialize_path)?,
|
|
})
|
|
}
|
|
fn with_fallback(self, fallback: Self) -> Self {
|
|
Self {
|
|
manifest_path: self.manifest_path.or(fallback.manifest_path),
|
|
}
|
|
}
|
|
fn is_empty(&self) -> bool {
|
|
true && self.manifest_path.is_none()
|
|
}
|
|
fn is_complete(&self) -> bool {
|
|
true && self.manifest_path.is_some()
|
|
}
|
|
}
|
|
fn __confique_deserialize_some_manifest_path<'de, D>(deserializer: D)
|
|
-> std::result::Result<std::option::Option<PathBuf>, D::Error>
|
|
where D: confique::serde::Deserializer<'de> {
|
|
deserialize_path(deserializer).map(std::option::Option::Some)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl _serde::Serialize for ProjectCfg {
|
|
fn serialize<__S>(&self, __serializer: __S)
|
|
-> _serde::__private::Result<__S::Ok, __S::Error> where
|
|
__S: _serde::Serializer {
|
|
let mut __serde_state =
|
|
_serde::Serializer::serialize_struct(__serializer,
|
|
"ProjectCfg", false as usize + 1)?;
|
|
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
|
|
"manifest_path", &self.manifest_path)?;
|
|
_serde::ser::SerializeStruct::end(__serde_state)
|
|
}
|
|
}
|
|
};
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for ProjectCfg {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __field0, __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
0u64 => _serde::__private::Ok(__Field::__field0),
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
"manifest_path" => _serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
b"manifest_path" =>
|
|
_serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<ProjectCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = ProjectCfg;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct ProjectCfg")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, mut __seq: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
let __field0 =
|
|
match _serde::de::SeqAccess::next_element::<PathBuf>(&mut __seq)?
|
|
{
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
return _serde::__private::Err(_serde::de::Error::invalid_length(0usize,
|
|
&"struct ProjectCfg with 1 element")),
|
|
};
|
|
_serde::__private::Ok(ProjectCfg {
|
|
manifest_path: __field0,
|
|
})
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
let mut __field0: _serde::__private::Option<PathBuf> =
|
|
_serde::__private::None;
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
__Field::__field0 => {
|
|
if _serde::__private::Option::is_some(&__field0) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("manifest_path"));
|
|
}
|
|
__field0 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<PathBuf>(&mut __map)?);
|
|
}
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
let __field0 =
|
|
match __field0 {
|
|
_serde::__private::Some(__field0) => __field0,
|
|
_serde::__private::None =>
|
|
_serde::__private::de::missing_field("manifest_path")?,
|
|
};
|
|
_serde::__private::Ok(ProjectCfg {
|
|
manifest_path: __field0,
|
|
})
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] = &["manifest_path"];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"ProjectCfg", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<ProjectCfg>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
impl Fallback for ProjectCfg {
|
|
fn fallback() -> <Self as Config>::Partial {
|
|
Self::Partial {
|
|
manifest_path: project_dir().map(|d|
|
|
d.data_local_dir().join("manifest.toml")),
|
|
}
|
|
}
|
|
}
|
|
pub struct Cfg {
|
|
#[config(nested)]
|
|
pub editor: EditorCfg,
|
|
#[config(nested)]
|
|
pub project: ProjectCfg,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for Cfg {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field2_finish(f, "Cfg",
|
|
"editor", &self.editor, "project", &&self.project)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl confique::Config for Cfg {
|
|
type Partial = confique_partial_cfg::PartialCfg;
|
|
fn from_partial(partial: Self::Partial)
|
|
-> std::result::Result<Self, confique::Error> {
|
|
let out =
|
|
Self {
|
|
editor: confique::internal::map_err_prefix_path(confique::Config::from_partial(partial.editor),
|
|
"editor")?,
|
|
project: confique::internal::map_err_prefix_path(confique::Config::from_partial(partial.project),
|
|
"project")?,
|
|
};
|
|
std::result::Result::Ok(out)
|
|
}
|
|
const META: confique::meta::Meta =
|
|
confique::meta::Meta {
|
|
name: "Cfg",
|
|
doc: &[],
|
|
fields: &[confique::meta::Field {
|
|
name: "editor",
|
|
doc: &[],
|
|
kind: confique::meta::FieldKind::Nested {
|
|
meta: &<EditorCfg as confique::Config>::META,
|
|
},
|
|
},
|
|
confique::meta::Field {
|
|
name: "project",
|
|
doc: &[],
|
|
kind: confique::meta::FieldKind::Nested {
|
|
meta: &<ProjectCfg as confique::Config>::META,
|
|
},
|
|
}],
|
|
};
|
|
}
|
|
#[doc =
|
|
"*Generated* by `confique`: helpers to implement `Config` for [`Cfg`].\n\nDo not use directly! Only use via the `Config` and `Partial` traits and what's explained in the confique documentation.\n Any other parts of this module cannot be relied on and are not part of the semver guarantee of `confique`."]
|
|
pub mod confique_partial_cfg {
|
|
#![allow(missing_docs)]
|
|
use super::*;
|
|
#[serde(crate = "confique::serde")]
|
|
pub struct PartialCfg {
|
|
#[serde(default = "confique::Partial::empty")]
|
|
pub editor: <EditorCfg as confique::Config>::Partial,
|
|
#[serde(default = "confique::Partial::empty")]
|
|
pub project: <ProjectCfg as confique::Config>::Partial,
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes,
|
|
unused_qualifications, clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
use confique::serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> confique::serde::Deserialize<'de> for PartialCfg {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> confique::serde::__private::Result<Self, __D::Error>
|
|
where __D: confique::serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __field0, __field1, __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
0u64 => _serde::__private::Ok(__Field::__field0),
|
|
1u64 => _serde::__private::Ok(__Field::__field1),
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
"editor" => _serde::__private::Ok(__Field::__field0),
|
|
"project" => _serde::__private::Ok(__Field::__field1),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
b"editor" => _serde::__private::Ok(__Field::__field0),
|
|
b"project" => _serde::__private::Ok(__Field::__field1),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<PartialCfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = PartialCfg;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct PartialCfg")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, mut __seq: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
let __field0 =
|
|
match _serde::de::SeqAccess::next_element::<<EditorCfg as
|
|
confique::Config>::Partial>(&mut __seq)? {
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None => confique::Partial::empty(),
|
|
};
|
|
let __field1 =
|
|
match _serde::de::SeqAccess::next_element::<<ProjectCfg as
|
|
confique::Config>::Partial>(&mut __seq)? {
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None => confique::Partial::empty(),
|
|
};
|
|
_serde::__private::Ok(PartialCfg {
|
|
editor: __field0,
|
|
project: __field1,
|
|
})
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
let mut __field0:
|
|
_serde::__private::Option<<EditorCfg as
|
|
confique::Config>::Partial> = _serde::__private::None;
|
|
let mut __field1:
|
|
_serde::__private::Option<<ProjectCfg as
|
|
confique::Config>::Partial> = _serde::__private::None;
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
__Field::__field0 => {
|
|
if _serde::__private::Option::is_some(&__field0) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("editor"));
|
|
}
|
|
__field0 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<<EditorCfg
|
|
as confique::Config>::Partial>(&mut __map)?);
|
|
}
|
|
__Field::__field1 => {
|
|
if _serde::__private::Option::is_some(&__field1) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("project"));
|
|
}
|
|
__field1 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<<ProjectCfg
|
|
as confique::Config>::Partial>(&mut __map)?);
|
|
}
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
let __field0 =
|
|
match __field0 {
|
|
_serde::__private::Some(__field0) => __field0,
|
|
_serde::__private::None => confique::Partial::empty(),
|
|
};
|
|
let __field1 =
|
|
match __field1 {
|
|
_serde::__private::Some(__field1) => __field1,
|
|
_serde::__private::None => confique::Partial::empty(),
|
|
};
|
|
_serde::__private::Ok(PartialCfg {
|
|
editor: __field0,
|
|
project: __field1,
|
|
})
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] =
|
|
&["editor", "project"];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"PartialCfg", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<PartialCfg>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
#[automatically_derived]
|
|
impl confique::Partial for PartialCfg where
|
|
EditorCfg: confique::Config, ProjectCfg: confique::Config {
|
|
fn empty() -> Self {
|
|
Self {
|
|
editor: confique::Partial::empty(),
|
|
project: confique::Partial::empty(),
|
|
}
|
|
}
|
|
fn default_values() -> Self {
|
|
Self {
|
|
editor: confique::Partial::default_values(),
|
|
project: confique::Partial::default_values(),
|
|
}
|
|
}
|
|
fn from_env() -> std::result::Result<Self, confique::Error> {
|
|
std::result::Result::Ok(Self {
|
|
editor: confique::Partial::from_env()?,
|
|
project: confique::Partial::from_env()?,
|
|
})
|
|
}
|
|
fn with_fallback(self, fallback: Self) -> Self {
|
|
Self {
|
|
editor: self.editor.with_fallback(fallback.editor),
|
|
project: self.project.with_fallback(fallback.project),
|
|
}
|
|
}
|
|
fn is_empty(&self) -> bool {
|
|
true && self.editor.is_empty() && self.project.is_empty()
|
|
}
|
|
fn is_complete(&self) -> bool {
|
|
true && self.editor.is_complete() &&
|
|
self.project.is_complete()
|
|
}
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl _serde::Serialize for Cfg {
|
|
fn serialize<__S>(&self, __serializer: __S)
|
|
-> _serde::__private::Result<__S::Ok, __S::Error> where
|
|
__S: _serde::Serializer {
|
|
let mut __serde_state =
|
|
_serde::Serializer::serialize_struct(__serializer, "Cfg",
|
|
false as usize + 1 + 1)?;
|
|
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
|
|
"editor", &self.editor)?;
|
|
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
|
|
"project", &self.project)?;
|
|
_serde::ser::SerializeStruct::end(__serde_state)
|
|
}
|
|
}
|
|
};
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for Cfg {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __field0, __field1, __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
0u64 => _serde::__private::Ok(__Field::__field0),
|
|
1u64 => _serde::__private::Ok(__Field::__field1),
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
"editor" => _serde::__private::Ok(__Field::__field0),
|
|
"project" => _serde::__private::Ok(__Field::__field1),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
b"editor" => _serde::__private::Ok(__Field::__field0),
|
|
b"project" => _serde::__private::Ok(__Field::__field1),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<Cfg>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = Cfg;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct Cfg")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, mut __seq: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
let __field0 =
|
|
match _serde::de::SeqAccess::next_element::<EditorCfg>(&mut __seq)?
|
|
{
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
return _serde::__private::Err(_serde::de::Error::invalid_length(0usize,
|
|
&"struct Cfg with 2 elements")),
|
|
};
|
|
let __field1 =
|
|
match _serde::de::SeqAccess::next_element::<ProjectCfg>(&mut __seq)?
|
|
{
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
return _serde::__private::Err(_serde::de::Error::invalid_length(1usize,
|
|
&"struct Cfg with 2 elements")),
|
|
};
|
|
_serde::__private::Ok(Cfg {
|
|
editor: __field0,
|
|
project: __field1,
|
|
})
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
let mut __field0: _serde::__private::Option<EditorCfg> =
|
|
_serde::__private::None;
|
|
let mut __field1: _serde::__private::Option<ProjectCfg> =
|
|
_serde::__private::None;
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
__Field::__field0 => {
|
|
if _serde::__private::Option::is_some(&__field0) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("editor"));
|
|
}
|
|
__field0 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<EditorCfg>(&mut __map)?);
|
|
}
|
|
__Field::__field1 => {
|
|
if _serde::__private::Option::is_some(&__field1) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("project"));
|
|
}
|
|
__field1 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<ProjectCfg>(&mut __map)?);
|
|
}
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
let __field0 =
|
|
match __field0 {
|
|
_serde::__private::Some(__field0) => __field0,
|
|
_serde::__private::None =>
|
|
_serde::__private::de::missing_field("editor")?,
|
|
};
|
|
let __field1 =
|
|
match __field1 {
|
|
_serde::__private::Some(__field1) => __field1,
|
|
_serde::__private::None =>
|
|
_serde::__private::de::missing_field("project")?,
|
|
};
|
|
_serde::__private::Ok(Cfg {
|
|
editor: __field0,
|
|
project: __field1,
|
|
})
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] =
|
|
&["editor", "project"];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"Cfg", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<Cfg>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
impl Cfg {
|
|
pub fn from_env() -> Result<Cfg, Error> {
|
|
let mut builder = Cfg::builder().env();
|
|
if let Some(dir) = project_dir() {
|
|
builder = builder.file(dir.config_dir().join("config.toml"));
|
|
}
|
|
builder.preloaded(Self::fallback()).load().map_err(Into::into)
|
|
}
|
|
}
|
|
impl Fallback for Cfg {
|
|
fn fallback() -> <Self as Config>::Partial {
|
|
Self::Partial {
|
|
editor: EditorCfg::fallback(),
|
|
project: ProjectCfg::fallback(),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
pub mod editor {
|
|
pub struct Editor {}
|
|
}
|
|
pub mod editor_command {
|
|
use std::{
|
|
ffi::OsString, net::IpAddr, ops::{Deref, DerefMut},
|
|
path::PathBuf, time::Duration,
|
|
};
|
|
use derive_more::Display;
|
|
use osstr_traits_derive::OsDisplay;
|
|
use serde::{Deserialize, Serialize};
|
|
use crate::collection::{CommandArgs, DelimitedVec};
|
|
type OsStrDisplay<'a> = std::ffi::os_str::Display<'a>;
|
|
type PathDisplay<'a> = std::path::Display<'a>;
|
|
#[os_display(from_display)]
|
|
pub enum ConsistencyCheckSourceMode {
|
|
|
|
#[display("local")]
|
|
Local,
|
|
|
|
#[display("cacheserver")]
|
|
CacheServer,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for ConsistencyCheckSourceMode {
|
|
#[inline]
|
|
fn clone(&self) -> ConsistencyCheckSourceMode { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for ConsistencyCheckSourceMode { }
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for ConsistencyCheckSourceMode {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
ConsistencyCheckSourceMode::Local => "Local",
|
|
ConsistencyCheckSourceMode::CacheServer => "CacheServer",
|
|
})
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for ConsistencyCheckSourceMode {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::Local => {
|
|
__derive_more_f.write_fmt(format_args!("local"))
|
|
}
|
|
Self::CacheServer => {
|
|
__derive_more_f.write_fmt(format_args!("cacheserver"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for ConsistencyCheckSourceMode {
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for ConsistencyCheckSourceMode {
|
|
#[inline]
|
|
fn eq(&self, other: &ConsistencyCheckSourceMode) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for ConsistencyCheckSourceMode {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for ConsistencyCheckSourceMode {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &ConsistencyCheckSourceMode)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for ConsistencyCheckSourceMode {
|
|
#[inline]
|
|
fn cmp(&self, other: &ConsistencyCheckSourceMode)
|
|
-> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for ConsistencyCheckSourceMode {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("{0} {1}", DelimitedVec::<PathDisplay>::from(exports),
|
|
path.display())]
|
|
#[os_display("{exports} {path}", exports = DelimitedVec::<&PathBuf,
|
|
' '>::from_iter(exports), path = path)]
|
|
pub struct ExportPackage {
|
|
path: PathBuf,
|
|
exports: Vec<PathBuf>,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for ExportPackage {
|
|
#[inline]
|
|
fn clone(&self) -> ExportPackage {
|
|
ExportPackage {
|
|
path: ::core::clone::Clone::clone(&self.path),
|
|
exports: ::core::clone::Clone::clone(&self.exports),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for ExportPackage {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field2_finish(f,
|
|
"ExportPackage", "path", &self.path, "exports",
|
|
&&self.exports)
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for ExportPackage {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
let path = &self.path;
|
|
let exports = &self.exports;
|
|
__derive_more_f.write_fmt(format_args!("{0} {1}",
|
|
DelimitedVec::<PathDisplay>::from(exports), path.display()))
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for ExportPackage { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for ExportPackage {
|
|
#[inline]
|
|
fn eq(&self, other: &ExportPackage) -> bool {
|
|
self.path == other.path && self.exports == other.exports
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for ExportPackage {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<PathBuf>;
|
|
let _: ::core::cmp::AssertParamIsEq<Vec<PathBuf>>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for ExportPackage {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &ExportPackage)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
match ::core::cmp::PartialOrd::partial_cmp(&self.path,
|
|
&other.path) {
|
|
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
|
|
::core::cmp::PartialOrd::partial_cmp(&self.exports,
|
|
&other.exports),
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for ExportPackage {
|
|
#[inline]
|
|
fn cmp(&self, other: &ExportPackage) -> ::core::cmp::Ordering {
|
|
match ::core::cmp::Ord::cmp(&self.path, &other.path) {
|
|
::core::cmp::Ordering::Equal =>
|
|
::core::cmp::Ord::cmp(&self.exports, &other.exports),
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for ExportPackage {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
let Self { path, exports } = self;
|
|
(DelimitedVec::<&PathBuf, ' '>::from_iter(exports)).fmt_os(f)?;
|
|
f.write_str(" ")?;
|
|
(path).fmt_os(f)?;
|
|
Ok(())
|
|
}
|
|
}
|
|
#[os_display(from_display)]
|
|
pub enum PlatformTextureFormat {
|
|
|
|
#[display("dxt")]
|
|
Dxt,
|
|
|
|
#[display("pvrtc")]
|
|
#[deprecated(note =
|
|
"PVRTC format is deprecated. Use ASTC or ETC format instead.")]
|
|
Pvrtc,
|
|
|
|
#[display("atc")]
|
|
Atc,
|
|
|
|
#[display("etc")]
|
|
Etc,
|
|
|
|
#[display("etc2")]
|
|
Etc2,
|
|
|
|
#[display("astc")]
|
|
Astc,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for PlatformTextureFormat {
|
|
#[inline]
|
|
fn clone(&self) -> PlatformTextureFormat { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for PlatformTextureFormat { }
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for PlatformTextureFormat {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
PlatformTextureFormat::Dxt => "Dxt",
|
|
PlatformTextureFormat::Pvrtc => "Pvrtc",
|
|
PlatformTextureFormat::Atc => "Atc",
|
|
PlatformTextureFormat::Etc => "Etc",
|
|
PlatformTextureFormat::Etc2 => "Etc2",
|
|
PlatformTextureFormat::Astc => "Astc",
|
|
})
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for PlatformTextureFormat {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::Dxt => {
|
|
__derive_more_f.write_fmt(format_args!("dxt"))
|
|
}
|
|
Self::Pvrtc => {
|
|
__derive_more_f.write_fmt(format_args!("pvrtc"))
|
|
}
|
|
Self::Atc => {
|
|
__derive_more_f.write_fmt(format_args!("atc"))
|
|
}
|
|
Self::Etc => {
|
|
__derive_more_f.write_fmt(format_args!("etc"))
|
|
}
|
|
Self::Etc2 => {
|
|
__derive_more_f.write_fmt(format_args!("etc2"))
|
|
}
|
|
Self::Astc => {
|
|
__derive_more_f.write_fmt(format_args!("astc"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for PlatformTextureFormat { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for PlatformTextureFormat {
|
|
#[inline]
|
|
fn eq(&self, other: &PlatformTextureFormat) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for PlatformTextureFormat {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for PlatformTextureFormat {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &PlatformTextureFormat)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for PlatformTextureFormat {
|
|
#[inline]
|
|
fn cmp(&self, other: &PlatformTextureFormat)
|
|
-> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for PlatformTextureFormat {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[os_display(from_display)]
|
|
pub enum TextureCompression {
|
|
|
|
#[default]
|
|
NoOverride,
|
|
ForceUncompressed,
|
|
ForceFastCompressor,
|
|
ForceNoCrunchCompression,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for TextureCompression {
|
|
#[inline]
|
|
fn clone(&self) -> TextureCompression { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for TextureCompression { }
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for TextureCompression {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
TextureCompression::NoOverride => "NoOverride",
|
|
TextureCompression::ForceUncompressed =>
|
|
"ForceUncompressed",
|
|
TextureCompression::ForceFastCompressor =>
|
|
"ForceFastCompressor",
|
|
TextureCompression::ForceNoCrunchCompression =>
|
|
"ForceNoCrunchCompression",
|
|
})
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::default::Default for TextureCompression {
|
|
#[inline]
|
|
fn default() -> TextureCompression { Self::NoOverride }
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for TextureCompression {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::NoOverride => {
|
|
__derive_more_f.write_str("NoOverride")
|
|
}
|
|
Self::ForceUncompressed => {
|
|
__derive_more_f.write_str("ForceUncompressed")
|
|
}
|
|
Self::ForceFastCompressor => {
|
|
__derive_more_f.write_str("ForceFastCompressor")
|
|
}
|
|
Self::ForceNoCrunchCompression => {
|
|
__derive_more_f.write_str("ForceNoCrunchCompression")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for TextureCompression { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for TextureCompression {
|
|
#[inline]
|
|
fn eq(&self, other: &TextureCompression) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for TextureCompression {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for TextureCompression {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &TextureCompression)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for TextureCompression {
|
|
#[inline]
|
|
fn cmp(&self, other: &TextureCompression) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for TextureCompression {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
pub enum PerforceArgument {
|
|
|
|
#[display("vcPerforceWorkspace \"{0}\"", _0.display())]
|
|
#[os_display("vcPerforceWorkspace \"{_0}\"")]
|
|
Workspace(OsString),
|
|
|
|
#[display("vcPerforceServer \"{0}\"", _0.display())]
|
|
#[os_display("vcPerforceServer \"{_0}\"")]
|
|
Server(OsString),
|
|
|
|
#[display("vcPerforceUsername \"{0}\"", _0.display())]
|
|
#[os_display("vcPerforceUsername \"{_0}\"")]
|
|
Username(OsString),
|
|
|
|
#[display("vcPerforcePassword \"{0}\"", _0.display())]
|
|
#[os_display("vcPerforcePassword \"{_0}\"")]
|
|
Password(OsString),
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for PerforceArgument {
|
|
#[inline]
|
|
fn clone(&self) -> PerforceArgument {
|
|
match self {
|
|
PerforceArgument::Workspace(__self_0) =>
|
|
PerforceArgument::Workspace(::core::clone::Clone::clone(__self_0)),
|
|
PerforceArgument::Server(__self_0) =>
|
|
PerforceArgument::Server(::core::clone::Clone::clone(__self_0)),
|
|
PerforceArgument::Username(__self_0) =>
|
|
PerforceArgument::Username(::core::clone::Clone::clone(__self_0)),
|
|
PerforceArgument::Password(__self_0) =>
|
|
PerforceArgument::Password(::core::clone::Clone::clone(__self_0)),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for PerforceArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
PerforceArgument::Workspace(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Workspace", &__self_0),
|
|
PerforceArgument::Server(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Server", &__self_0),
|
|
PerforceArgument::Username(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Username", &__self_0),
|
|
PerforceArgument::Password(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Password", &__self_0),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for PerforceArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::Workspace(_0) => {
|
|
match &format_args!("vcPerforceWorkspace \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Server(_0) => {
|
|
match &format_args!("vcPerforceServer \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Username(_0) => {
|
|
match &format_args!("vcPerforceUsername \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Password(_0) => {
|
|
match &format_args!("vcPerforcePassword \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for PerforceArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for PerforceArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &PerforceArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(PerforceArgument::Workspace(__self_0),
|
|
PerforceArgument::Workspace(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(PerforceArgument::Server(__self_0),
|
|
PerforceArgument::Server(__arg1_0)) => __self_0 == __arg1_0,
|
|
(PerforceArgument::Username(__self_0),
|
|
PerforceArgument::Username(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(PerforceArgument::Password(__self_0),
|
|
PerforceArgument::Password(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
_ => unsafe { ::core::intrinsics::unreachable() }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for PerforceArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<OsString>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for PerforceArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &PerforceArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(PerforceArgument::Workspace(__self_0),
|
|
PerforceArgument::Workspace(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(PerforceArgument::Server(__self_0),
|
|
PerforceArgument::Server(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(PerforceArgument::Username(__self_0),
|
|
PerforceArgument::Username(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(PerforceArgument::Password(__self_0),
|
|
PerforceArgument::Password(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for PerforceArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &PerforceArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(PerforceArgument::Workspace(__self_0),
|
|
PerforceArgument::Workspace(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(PerforceArgument::Server(__self_0),
|
|
PerforceArgument::Server(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(PerforceArgument::Username(__self_0),
|
|
PerforceArgument::Username(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(PerforceArgument::Password(__self_0),
|
|
PerforceArgument::Password(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => unsafe { ::core::intrinsics::unreachable() }
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for PerforceArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
PerforceArgument::Workspace(_0) => {
|
|
f.write_str("vcPerforceWorkspace \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
PerforceArgument::Server(_0) => {
|
|
f.write_str("vcPerforceServer \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
PerforceArgument::Username(_0) => {
|
|
f.write_str("vcPerforceUsername \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
PerforceArgument::Password(_0) => {
|
|
f.write_str("vcPerforcePassword \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
#[os_display(from_display)]
|
|
pub enum VcsMode {
|
|
|
|
#[display("\"Visible Meta Files\"")]
|
|
VisibleMetaFiles,
|
|
|
|
#[display("\"Hidden Meta Files\"")]
|
|
HiddenMetaFiles,
|
|
|
|
#[display("Perforce {_0}")]
|
|
#[os_display("Perforce {_0}")]
|
|
Perforce(CommandArgs<PerforceArgument>),
|
|
|
|
#[display("PlasticSCM")]
|
|
PlasticScm,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for VcsMode {
|
|
#[inline]
|
|
fn clone(&self) -> VcsMode {
|
|
match self {
|
|
VcsMode::VisibleMetaFiles => VcsMode::VisibleMetaFiles,
|
|
VcsMode::HiddenMetaFiles => VcsMode::HiddenMetaFiles,
|
|
VcsMode::Perforce(__self_0) =>
|
|
VcsMode::Perforce(::core::clone::Clone::clone(__self_0)),
|
|
VcsMode::PlasticScm => VcsMode::PlasticScm,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for VcsMode {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
VcsMode::VisibleMetaFiles =>
|
|
::core::fmt::Formatter::write_str(f, "VisibleMetaFiles"),
|
|
VcsMode::HiddenMetaFiles =>
|
|
::core::fmt::Formatter::write_str(f, "HiddenMetaFiles"),
|
|
VcsMode::Perforce(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Perforce", &__self_0),
|
|
VcsMode::PlasticScm =>
|
|
::core::fmt::Formatter::write_str(f, "PlasticScm"),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for VcsMode {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::VisibleMetaFiles => {
|
|
__derive_more_f.write_fmt(format_args!("\"Visible Meta Files\""))
|
|
}
|
|
Self::HiddenMetaFiles => {
|
|
__derive_more_f.write_fmt(format_args!("\"Hidden Meta Files\""))
|
|
}
|
|
Self::Perforce(_0) => {
|
|
__derive_more_f.write_fmt(format_args!("Perforce {0}", _0))
|
|
}
|
|
Self::PlasticScm => {
|
|
__derive_more_f.write_fmt(format_args!("PlasticSCM"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for VcsMode { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for VcsMode {
|
|
#[inline]
|
|
fn eq(&self, other: &VcsMode) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(VcsMode::Perforce(__self_0), VcsMode::Perforce(__arg1_0))
|
|
=> __self_0 == __arg1_0,
|
|
_ => true,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for VcsMode {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _:
|
|
::core::cmp::AssertParamIsEq<CommandArgs<PerforceArgument>>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for VcsMode {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &VcsMode)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(VcsMode::Perforce(__self_0), VcsMode::Perforce(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for VcsMode {
|
|
#[inline]
|
|
fn cmp(&self, other: &VcsMode) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(VcsMode::Perforce(__self_0), VcsMode::Perforce(__arg1_0))
|
|
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => ::core::cmp::Ordering::Equal,
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for VcsMode {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
VcsMode::Perforce(_0) => {
|
|
f.write_str("Perforce ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
_ => { f.write_str(&self.to_string())? }
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum ConfigurationArgument {
|
|
|
|
#[display("createProject \"{0}\"", _0.display())]
|
|
#[os_display("-createProject \"{_0}\"")]
|
|
CreateProject(PathBuf),
|
|
|
|
#[display("consistencyCheck")]
|
|
ConsistencyCheck,
|
|
|
|
#[display("consistencyCheckSourceMode {_0}")]
|
|
ConsistencyCheckSourceMode(ConsistencyCheckSourceMode),
|
|
|
|
#[display("disable-assembly-updater {0}", DelimitedVec::<PathDisplay,
|
|
' '>::from(_0))]
|
|
#[os_display("-disable-assembly-updater {}", DelimitedVec::<&PathBuf,
|
|
' '>::from_iter(_0))]
|
|
DisableAssemblyUpdater(Vec<PathBuf>),
|
|
|
|
#[display("disable-gpu-skinning")]
|
|
DisableGpuSkinning,
|
|
|
|
#[display("disable-playback-engines {0}", DelimitedVec::<OsStrDisplay,
|
|
' '>::from(_0))]
|
|
#[os_display("-disable-playback-engines {}",
|
|
DelimitedVec::<&std::ffi::OsString, ' '>::from_iter(_0))]
|
|
DisablePlaybackEngines(Vec<OsString>),
|
|
|
|
#[display("executeMethod {0}", _0.display())]
|
|
#[os_display("-executeMethod {_0}")]
|
|
ExecMethod(OsString),
|
|
|
|
#[display("exportPackage {_0}")]
|
|
#[os_display("-exportPackage {_0}")]
|
|
ExportPackage(ExportPackage),
|
|
|
|
#[display("importPackage {0}", _0.display())]
|
|
#[os_display("-importPackage {_0}")]
|
|
ImportPackage(PathBuf),
|
|
|
|
#[display("job-worker-count {_0}")]
|
|
JobWorkerCount(usize),
|
|
|
|
#[display("gc-helper-count {_0}")]
|
|
GcHelperCount(usize),
|
|
|
|
#[display("logFile {0}", _0.display())]
|
|
#[os_display("-logFile {_0}")]
|
|
LogFile(PathBuf),
|
|
|
|
#[display("noUpm")]
|
|
NoUpm,
|
|
|
|
#[display("openfile {0}", _0.display())]
|
|
#[os_display("-openfile {_0}")]
|
|
OpenFile(PathBuf),
|
|
|
|
#[display("password {0}", _0.display())]
|
|
#[os_display("-password {_0}")]
|
|
Password(OsString),
|
|
|
|
#[display("projectPath {0}", _0.display())]
|
|
#[os_display("-projectPath {_0}")]
|
|
ProjectPath(PathBuf),
|
|
|
|
#[display("quit")]
|
|
Quit,
|
|
|
|
#[display("releaseCodeOptimization")]
|
|
ReleaseCodeOptimization,
|
|
|
|
#[display("setDefaultPlatformTextureFormat {_0}")]
|
|
SetDefaultPlatformTextureFormat(PlatformTextureFormat),
|
|
|
|
#[display("overrideMaxTextureSize {_0}")]
|
|
OverrideMaxTextureSize(usize),
|
|
|
|
#[display("overrideTextureCompression {_0}")]
|
|
OverrideTextureCompression(TextureCompression),
|
|
|
|
#[display("silent-crashes")]
|
|
SilentCrashes,
|
|
|
|
#[display("upmLogFile {0}", _0.display())]
|
|
#[os_display("-upmLogFile {_0}")]
|
|
UpmLogFile(PathBuf),
|
|
|
|
#[display("username {0}", _0.display())]
|
|
#[os_display("-username {_0}")]
|
|
Username(OsString),
|
|
|
|
#[display("vcsMode {_0}")]
|
|
VcsMode(VcsMode),
|
|
|
|
#[display("version")]
|
|
Version,
|
|
|
|
#[display("timestamps")]
|
|
Timestamps,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for ConfigurationArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
ConfigurationArgument::CreateProject(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"CreateProject", &__self_0),
|
|
ConfigurationArgument::ConsistencyCheck =>
|
|
::core::fmt::Formatter::write_str(f, "ConsistencyCheck"),
|
|
ConfigurationArgument::ConsistencyCheckSourceMode(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"ConsistencyCheckSourceMode", &__self_0),
|
|
ConfigurationArgument::DisableAssemblyUpdater(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"DisableAssemblyUpdater", &__self_0),
|
|
ConfigurationArgument::DisableGpuSkinning =>
|
|
::core::fmt::Formatter::write_str(f, "DisableGpuSkinning"),
|
|
ConfigurationArgument::DisablePlaybackEngines(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"DisablePlaybackEngines", &__self_0),
|
|
ConfigurationArgument::ExecMethod(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"ExecMethod", &__self_0),
|
|
ConfigurationArgument::ExportPackage(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"ExportPackage", &__self_0),
|
|
ConfigurationArgument::ImportPackage(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"ImportPackage", &__self_0),
|
|
ConfigurationArgument::JobWorkerCount(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"JobWorkerCount", &__self_0),
|
|
ConfigurationArgument::GcHelperCount(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"GcHelperCount", &__self_0),
|
|
ConfigurationArgument::LogFile(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"LogFile", &__self_0),
|
|
ConfigurationArgument::NoUpm =>
|
|
::core::fmt::Formatter::write_str(f, "NoUpm"),
|
|
ConfigurationArgument::OpenFile(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"OpenFile", &__self_0),
|
|
ConfigurationArgument::Password(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Password", &__self_0),
|
|
ConfigurationArgument::ProjectPath(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"ProjectPath", &__self_0),
|
|
ConfigurationArgument::Quit =>
|
|
::core::fmt::Formatter::write_str(f, "Quit"),
|
|
ConfigurationArgument::ReleaseCodeOptimization =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"ReleaseCodeOptimization"),
|
|
ConfigurationArgument::SetDefaultPlatformTextureFormat(__self_0)
|
|
=>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"SetDefaultPlatformTextureFormat", &__self_0),
|
|
ConfigurationArgument::OverrideMaxTextureSize(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"OverrideMaxTextureSize", &__self_0),
|
|
ConfigurationArgument::OverrideTextureCompression(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"OverrideTextureCompression", &__self_0),
|
|
ConfigurationArgument::SilentCrashes =>
|
|
::core::fmt::Formatter::write_str(f, "SilentCrashes"),
|
|
ConfigurationArgument::UpmLogFile(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"UpmLogFile", &__self_0),
|
|
ConfigurationArgument::Username(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Username", &__self_0),
|
|
ConfigurationArgument::VcsMode(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"VcsMode", &__self_0),
|
|
ConfigurationArgument::Version =>
|
|
::core::fmt::Formatter::write_str(f, "Version"),
|
|
ConfigurationArgument::Timestamps =>
|
|
::core::fmt::Formatter::write_str(f, "Timestamps"),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for ConfigurationArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::CreateProject(_0) => {
|
|
match &format_args!("createProject \"{0}\"", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ConsistencyCheck => {
|
|
match &format_args!("consistencyCheck") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ConsistencyCheckSourceMode(_0) => {
|
|
match &format_args!("consistencyCheckSourceMode {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::DisableAssemblyUpdater(_0) => {
|
|
match &format_args!("disable-assembly-updater {0}",
|
|
DelimitedVec::<PathDisplay, ' '>::from(_0)) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::DisableGpuSkinning => {
|
|
match &format_args!("disable-gpu-skinning") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::DisablePlaybackEngines(_0) => {
|
|
match &format_args!("disable-playback-engines {0}",
|
|
DelimitedVec::<OsStrDisplay, ' '>::from(_0)) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ExecMethod(_0) => {
|
|
match &format_args!("executeMethod {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ExportPackage(_0) => {
|
|
match &format_args!("exportPackage {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ImportPackage(_0) => {
|
|
match &format_args!("importPackage {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::JobWorkerCount(_0) => {
|
|
match &format_args!("job-worker-count {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::GcHelperCount(_0) => {
|
|
match &format_args!("gc-helper-count {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::LogFile(_0) => {
|
|
match &format_args!("logFile {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::NoUpm => {
|
|
match &format_args!("noUpm") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::OpenFile(_0) => {
|
|
match &format_args!("openfile {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Password(_0) => {
|
|
match &format_args!("password {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ProjectPath(_0) => {
|
|
match &format_args!("projectPath {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Quit => {
|
|
match &format_args!("quit") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ReleaseCodeOptimization => {
|
|
match &format_args!("releaseCodeOptimization") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::SetDefaultPlatformTextureFormat(_0) => {
|
|
match &format_args!("setDefaultPlatformTextureFormat {0}",
|
|
_0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::OverrideMaxTextureSize(_0) => {
|
|
match &format_args!("overrideMaxTextureSize {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::OverrideTextureCompression(_0) => {
|
|
match &format_args!("overrideTextureCompression {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::SilentCrashes => {
|
|
match &format_args!("silent-crashes") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::UpmLogFile(_0) => {
|
|
match &format_args!("upmLogFile {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Username(_0) => {
|
|
match &format_args!("username {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::VcsMode(_0) => {
|
|
match &format_args!("vcsMode {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Version => {
|
|
match &format_args!("version") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Timestamps => {
|
|
match &format_args!("timestamps") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for ConfigurationArgument {
|
|
#[inline]
|
|
fn clone(&self) -> ConfigurationArgument {
|
|
match self {
|
|
ConfigurationArgument::CreateProject(__self_0) =>
|
|
ConfigurationArgument::CreateProject(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::ConsistencyCheck =>
|
|
ConfigurationArgument::ConsistencyCheck,
|
|
ConfigurationArgument::ConsistencyCheckSourceMode(__self_0) =>
|
|
ConfigurationArgument::ConsistencyCheckSourceMode(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::DisableAssemblyUpdater(__self_0) =>
|
|
ConfigurationArgument::DisableAssemblyUpdater(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::DisableGpuSkinning =>
|
|
ConfigurationArgument::DisableGpuSkinning,
|
|
ConfigurationArgument::DisablePlaybackEngines(__self_0) =>
|
|
ConfigurationArgument::DisablePlaybackEngines(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::ExecMethod(__self_0) =>
|
|
ConfigurationArgument::ExecMethod(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::ExportPackage(__self_0) =>
|
|
ConfigurationArgument::ExportPackage(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::ImportPackage(__self_0) =>
|
|
ConfigurationArgument::ImportPackage(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::JobWorkerCount(__self_0) =>
|
|
ConfigurationArgument::JobWorkerCount(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::GcHelperCount(__self_0) =>
|
|
ConfigurationArgument::GcHelperCount(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::LogFile(__self_0) =>
|
|
ConfigurationArgument::LogFile(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::NoUpm => ConfigurationArgument::NoUpm,
|
|
ConfigurationArgument::OpenFile(__self_0) =>
|
|
ConfigurationArgument::OpenFile(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::Password(__self_0) =>
|
|
ConfigurationArgument::Password(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::ProjectPath(__self_0) =>
|
|
ConfigurationArgument::ProjectPath(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::Quit => ConfigurationArgument::Quit,
|
|
ConfigurationArgument::ReleaseCodeOptimization =>
|
|
ConfigurationArgument::ReleaseCodeOptimization,
|
|
ConfigurationArgument::SetDefaultPlatformTextureFormat(__self_0)
|
|
=>
|
|
ConfigurationArgument::SetDefaultPlatformTextureFormat(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::OverrideMaxTextureSize(__self_0) =>
|
|
ConfigurationArgument::OverrideMaxTextureSize(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::OverrideTextureCompression(__self_0) =>
|
|
ConfigurationArgument::OverrideTextureCompression(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::SilentCrashes =>
|
|
ConfigurationArgument::SilentCrashes,
|
|
ConfigurationArgument::UpmLogFile(__self_0) =>
|
|
ConfigurationArgument::UpmLogFile(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::Username(__self_0) =>
|
|
ConfigurationArgument::Username(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::VcsMode(__self_0) =>
|
|
ConfigurationArgument::VcsMode(::core::clone::Clone::clone(__self_0)),
|
|
ConfigurationArgument::Version =>
|
|
ConfigurationArgument::Version,
|
|
ConfigurationArgument::Timestamps =>
|
|
ConfigurationArgument::Timestamps,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for ConfigurationArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for ConfigurationArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &ConfigurationArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(ConfigurationArgument::CreateProject(__self_0),
|
|
ConfigurationArgument::CreateProject(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::ConsistencyCheckSourceMode(__self_0),
|
|
ConfigurationArgument::ConsistencyCheckSourceMode(__arg1_0))
|
|
=> __self_0 == __arg1_0,
|
|
(ConfigurationArgument::DisableAssemblyUpdater(__self_0),
|
|
ConfigurationArgument::DisableAssemblyUpdater(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::DisablePlaybackEngines(__self_0),
|
|
ConfigurationArgument::DisablePlaybackEngines(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::ExecMethod(__self_0),
|
|
ConfigurationArgument::ExecMethod(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::ExportPackage(__self_0),
|
|
ConfigurationArgument::ExportPackage(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::ImportPackage(__self_0),
|
|
ConfigurationArgument::ImportPackage(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::JobWorkerCount(__self_0),
|
|
ConfigurationArgument::JobWorkerCount(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::GcHelperCount(__self_0),
|
|
ConfigurationArgument::GcHelperCount(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::LogFile(__self_0),
|
|
ConfigurationArgument::LogFile(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::OpenFile(__self_0),
|
|
ConfigurationArgument::OpenFile(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::Password(__self_0),
|
|
ConfigurationArgument::Password(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::ProjectPath(__self_0),
|
|
ConfigurationArgument::ProjectPath(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::SetDefaultPlatformTextureFormat(__self_0),
|
|
ConfigurationArgument::SetDefaultPlatformTextureFormat(__arg1_0))
|
|
=> __self_0 == __arg1_0,
|
|
(ConfigurationArgument::OverrideMaxTextureSize(__self_0),
|
|
ConfigurationArgument::OverrideMaxTextureSize(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::OverrideTextureCompression(__self_0),
|
|
ConfigurationArgument::OverrideTextureCompression(__arg1_0))
|
|
=> __self_0 == __arg1_0,
|
|
(ConfigurationArgument::UpmLogFile(__self_0),
|
|
ConfigurationArgument::UpmLogFile(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::Username(__self_0),
|
|
ConfigurationArgument::Username(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ConfigurationArgument::VcsMode(__self_0),
|
|
ConfigurationArgument::VcsMode(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
_ => true,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for ConfigurationArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<PathBuf>;
|
|
let _: ::core::cmp::AssertParamIsEq<ConsistencyCheckSourceMode>;
|
|
let _: ::core::cmp::AssertParamIsEq<Vec<PathBuf>>;
|
|
let _: ::core::cmp::AssertParamIsEq<Vec<OsString>>;
|
|
let _: ::core::cmp::AssertParamIsEq<OsString>;
|
|
let _: ::core::cmp::AssertParamIsEq<ExportPackage>;
|
|
let _: ::core::cmp::AssertParamIsEq<usize>;
|
|
let _: ::core::cmp::AssertParamIsEq<PlatformTextureFormat>;
|
|
let _: ::core::cmp::AssertParamIsEq<TextureCompression>;
|
|
let _: ::core::cmp::AssertParamIsEq<VcsMode>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for ConfigurationArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &ConfigurationArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr) {
|
|
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
|
|
match (self, other) {
|
|
(ConfigurationArgument::CreateProject(__self_0),
|
|
ConfigurationArgument::CreateProject(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ConsistencyCheckSourceMode(__self_0),
|
|
ConfigurationArgument::ConsistencyCheckSourceMode(__arg1_0))
|
|
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::DisableAssemblyUpdater(__self_0),
|
|
ConfigurationArgument::DisableAssemblyUpdater(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::DisablePlaybackEngines(__self_0),
|
|
ConfigurationArgument::DisablePlaybackEngines(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ExecMethod(__self_0),
|
|
ConfigurationArgument::ExecMethod(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ExportPackage(__self_0),
|
|
ConfigurationArgument::ExportPackage(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ImportPackage(__self_0),
|
|
ConfigurationArgument::ImportPackage(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::JobWorkerCount(__self_0),
|
|
ConfigurationArgument::JobWorkerCount(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::GcHelperCount(__self_0),
|
|
ConfigurationArgument::GcHelperCount(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::LogFile(__self_0),
|
|
ConfigurationArgument::LogFile(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::OpenFile(__self_0),
|
|
ConfigurationArgument::OpenFile(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::Password(__self_0),
|
|
ConfigurationArgument::Password(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ProjectPath(__self_0),
|
|
ConfigurationArgument::ProjectPath(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::SetDefaultPlatformTextureFormat(__self_0),
|
|
ConfigurationArgument::SetDefaultPlatformTextureFormat(__arg1_0))
|
|
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::OverrideMaxTextureSize(__self_0),
|
|
ConfigurationArgument::OverrideMaxTextureSize(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::OverrideTextureCompression(__self_0),
|
|
ConfigurationArgument::OverrideTextureCompression(__arg1_0))
|
|
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::UpmLogFile(__self_0),
|
|
ConfigurationArgument::UpmLogFile(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::Username(__self_0),
|
|
ConfigurationArgument::Username(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::VcsMode(__self_0),
|
|
ConfigurationArgument::VcsMode(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::option::Option::Some(::core::cmp::Ordering::Equal),
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for ConfigurationArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &ConfigurationArgument)
|
|
-> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(ConfigurationArgument::CreateProject(__self_0),
|
|
ConfigurationArgument::CreateProject(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ConsistencyCheckSourceMode(__self_0),
|
|
ConfigurationArgument::ConsistencyCheckSourceMode(__arg1_0))
|
|
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::DisableAssemblyUpdater(__self_0),
|
|
ConfigurationArgument::DisableAssemblyUpdater(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::DisablePlaybackEngines(__self_0),
|
|
ConfigurationArgument::DisablePlaybackEngines(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ExecMethod(__self_0),
|
|
ConfigurationArgument::ExecMethod(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ExportPackage(__self_0),
|
|
ConfigurationArgument::ExportPackage(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ImportPackage(__self_0),
|
|
ConfigurationArgument::ImportPackage(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::JobWorkerCount(__self_0),
|
|
ConfigurationArgument::JobWorkerCount(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::GcHelperCount(__self_0),
|
|
ConfigurationArgument::GcHelperCount(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::LogFile(__self_0),
|
|
ConfigurationArgument::LogFile(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::OpenFile(__self_0),
|
|
ConfigurationArgument::OpenFile(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::Password(__self_0),
|
|
ConfigurationArgument::Password(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::ProjectPath(__self_0),
|
|
ConfigurationArgument::ProjectPath(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::SetDefaultPlatformTextureFormat(__self_0),
|
|
ConfigurationArgument::SetDefaultPlatformTextureFormat(__arg1_0))
|
|
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::OverrideMaxTextureSize(__self_0),
|
|
ConfigurationArgument::OverrideMaxTextureSize(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::OverrideTextureCompression(__self_0),
|
|
ConfigurationArgument::OverrideTextureCompression(__arg1_0))
|
|
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::UpmLogFile(__self_0),
|
|
ConfigurationArgument::UpmLogFile(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::Username(__self_0),
|
|
ConfigurationArgument::Username(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ConfigurationArgument::VcsMode(__self_0),
|
|
ConfigurationArgument::VcsMode(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => ::core::cmp::Ordering::Equal,
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for ConfigurationArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
ConfigurationArgument::CreateProject(_0) => {
|
|
f.write_str("-createProject \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
ConfigurationArgument::DisableAssemblyUpdater(_0) => {
|
|
f.write_str("-disable-assembly-updater ")?;
|
|
(DelimitedVec::<&PathBuf, ' '>::from_iter(_0)).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::DisablePlaybackEngines(_0) => {
|
|
f.write_str("-disable-playback-engines ")?;
|
|
(DelimitedVec::<&std::ffi::OsString,
|
|
' '>::from_iter(_0)).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::ExecMethod(_0) => {
|
|
f.write_str("-executeMethod ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::ExportPackage(_0) => {
|
|
f.write_str("-exportPackage ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::ImportPackage(_0) => {
|
|
f.write_str("-importPackage ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::LogFile(_0) => {
|
|
f.write_str("-logFile ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::OpenFile(_0) => {
|
|
f.write_str("-openfile ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::Password(_0) => {
|
|
f.write_str("-password ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::ProjectPath(_0) => {
|
|
f.write_str("-projectPath ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::UpmLogFile(_0) => {
|
|
f.write_str("-upmLogFile ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
ConfigurationArgument::Username(_0) => {
|
|
f.write_str("-username ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
_ => { f.write_str(&self.to_string())? }
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum BatchModeArgument {
|
|
|
|
#[display("accent-apiupdate")]
|
|
AcceptApiUpdate,
|
|
|
|
#[display("batchmode")]
|
|
BatchMode,
|
|
|
|
#[display("ignorecompilererrors")]
|
|
IgnoreCompilerErrors,
|
|
|
|
#[display("nographics")]
|
|
NoGraphics,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for BatchModeArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
BatchModeArgument::AcceptApiUpdate => "AcceptApiUpdate",
|
|
BatchModeArgument::BatchMode => "BatchMode",
|
|
BatchModeArgument::IgnoreCompilerErrors =>
|
|
"IgnoreCompilerErrors",
|
|
BatchModeArgument::NoGraphics => "NoGraphics",
|
|
})
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for BatchModeArgument {
|
|
#[inline]
|
|
fn clone(&self) -> BatchModeArgument { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for BatchModeArgument { }
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for BatchModeArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::AcceptApiUpdate => {
|
|
match &format_args!("accent-apiupdate") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::BatchMode => {
|
|
match &format_args!("batchmode") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::IgnoreCompilerErrors => {
|
|
match &format_args!("ignorecompilererrors") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::NoGraphics => {
|
|
match &format_args!("nographics") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for BatchModeArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for BatchModeArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &BatchModeArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for BatchModeArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for BatchModeArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &BatchModeArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for BatchModeArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &BatchModeArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for BatchModeArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[os_display(from_display)]
|
|
pub enum BuildTarget {
|
|
|
|
#[display("win64")]
|
|
Win64,
|
|
|
|
#[display("win")]
|
|
Win,
|
|
|
|
#[display("osxuniversal")]
|
|
OsxUniversal,
|
|
|
|
#[display("linux64")]
|
|
Linux64,
|
|
|
|
#[display("android")]
|
|
Android,
|
|
|
|
#[display("ios")]
|
|
IOs,
|
|
|
|
#[display("webgl")]
|
|
WebGl,
|
|
|
|
#[display("tvos")]
|
|
TvOs,
|
|
|
|
#[display("windowsstoreapps")]
|
|
WindowsStoreApps,
|
|
|
|
#[display("cloudrendering")]
|
|
CloudRendering,
|
|
|
|
#[display("visionos")]
|
|
VisionOs,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for BuildTarget {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
BuildTarget::Win64 => "Win64",
|
|
BuildTarget::Win => "Win",
|
|
BuildTarget::OsxUniversal => "OsxUniversal",
|
|
BuildTarget::Linux64 => "Linux64",
|
|
BuildTarget::Android => "Android",
|
|
BuildTarget::IOs => "IOs",
|
|
BuildTarget::WebGl => "WebGl",
|
|
BuildTarget::TvOs => "TvOs",
|
|
BuildTarget::WindowsStoreApps => "WindowsStoreApps",
|
|
BuildTarget::CloudRendering => "CloudRendering",
|
|
BuildTarget::VisionOs => "VisionOs",
|
|
})
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for BuildTarget {
|
|
#[inline]
|
|
fn clone(&self) -> BuildTarget { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for BuildTarget { }
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for BuildTarget {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::Win64 => {
|
|
__derive_more_f.write_fmt(format_args!("win64"))
|
|
}
|
|
Self::Win => {
|
|
__derive_more_f.write_fmt(format_args!("win"))
|
|
}
|
|
Self::OsxUniversal => {
|
|
__derive_more_f.write_fmt(format_args!("osxuniversal"))
|
|
}
|
|
Self::Linux64 => {
|
|
__derive_more_f.write_fmt(format_args!("linux64"))
|
|
}
|
|
Self::Android => {
|
|
__derive_more_f.write_fmt(format_args!("android"))
|
|
}
|
|
Self::IOs => {
|
|
__derive_more_f.write_fmt(format_args!("ios"))
|
|
}
|
|
Self::WebGl => {
|
|
__derive_more_f.write_fmt(format_args!("webgl"))
|
|
}
|
|
Self::TvOs => {
|
|
__derive_more_f.write_fmt(format_args!("tvos"))
|
|
}
|
|
Self::WindowsStoreApps => {
|
|
__derive_more_f.write_fmt(format_args!("windowsstoreapps"))
|
|
}
|
|
Self::CloudRendering => {
|
|
__derive_more_f.write_fmt(format_args!("cloudrendering"))
|
|
}
|
|
Self::VisionOs => {
|
|
__derive_more_f.write_fmt(format_args!("visionos"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for BuildTarget { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for BuildTarget {
|
|
#[inline]
|
|
fn eq(&self, other: &BuildTarget) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for BuildTarget {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for BuildTarget {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &BuildTarget)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for BuildTarget {
|
|
#[inline]
|
|
fn cmp(&self, other: &BuildTarget) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for BuildTarget {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[os_display(from_display)]
|
|
pub enum BuildSubtarget { Player, Server, }
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for BuildSubtarget {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
BuildSubtarget::Player => "Player",
|
|
BuildSubtarget::Server => "Server",
|
|
})
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for BuildSubtarget {
|
|
#[inline]
|
|
fn clone(&self) -> BuildSubtarget { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for BuildSubtarget { }
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for BuildSubtarget {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::Player => { __derive_more_f.write_str("Player") }
|
|
Self::Server => { __derive_more_f.write_str("Server") }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for BuildSubtarget { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for BuildSubtarget {
|
|
#[inline]
|
|
fn eq(&self, other: &BuildSubtarget) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for BuildSubtarget {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for BuildSubtarget {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &BuildSubtarget)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for BuildSubtarget {
|
|
#[inline]
|
|
fn cmp(&self, other: &BuildSubtarget) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for BuildSubtarget {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
pub enum BuildArgument {
|
|
|
|
#[display("activeBuildProfile \"{0}\"", _0.display())]
|
|
#[os_display("activeBuildProfile \"{_0}\"")]
|
|
ActiveBuildProfile(PathBuf),
|
|
|
|
#[display("build \"{0}\"", _0.display())]
|
|
#[os_display("build \"{_0}\"")]
|
|
Build(PathBuf),
|
|
|
|
#[display("buildLinux64Player \"{0}\"", _0.display())]
|
|
#[os_display("buildLinux64Player \"{_0}\"")]
|
|
BuildLinux64Player(PathBuf),
|
|
|
|
#[display("buildLinuxHeadlessSimulation \"{0}\"", _0.display())]
|
|
#[os_display("buildLinuxHeadlessSimulation \"{_0}\"")]
|
|
BuildLinuxHeadlessSimulation(PathBuf),
|
|
|
|
#[display("buildOSXUniversalPlayer \"{0}\"", _0.display())]
|
|
#[os_display("buildOSXUniversalPlayer \"{_0}\"")]
|
|
BuildOsxUniversalPlayer(PathBuf),
|
|
|
|
#[display("buildTarget \"{_0}\"")]
|
|
BuildTarget(BuildTarget),
|
|
|
|
#[display("standaloneBuildSubtarget \"{_0}\"")]
|
|
#[os_display("standaloneBuildSubtarget \"{_0}\"")]
|
|
StandaloneBuildSubtarget(BuildSubtarget),
|
|
|
|
#[display("buildWindowsPlayer \"{0}\"", _0.display())]
|
|
#[os_display("buildWindowsPlayer \"{_0}\"")]
|
|
BuildWindowsPlayer(PathBuf),
|
|
|
|
#[display("buildWindows64Player \"{0}\"", _0.display())]
|
|
#[os_display("buildWindows64Player \"{_0}\"")]
|
|
BuildWindows64Player(PathBuf),
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for BuildArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
BuildArgument::ActiveBuildProfile(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"ActiveBuildProfile", &__self_0),
|
|
BuildArgument::Build(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Build", &__self_0),
|
|
BuildArgument::BuildLinux64Player(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"BuildLinux64Player", &__self_0),
|
|
BuildArgument::BuildLinuxHeadlessSimulation(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"BuildLinuxHeadlessSimulation", &__self_0),
|
|
BuildArgument::BuildOsxUniversalPlayer(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"BuildOsxUniversalPlayer", &__self_0),
|
|
BuildArgument::BuildTarget(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"BuildTarget", &__self_0),
|
|
BuildArgument::StandaloneBuildSubtarget(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"StandaloneBuildSubtarget", &__self_0),
|
|
BuildArgument::BuildWindowsPlayer(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"BuildWindowsPlayer", &__self_0),
|
|
BuildArgument::BuildWindows64Player(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"BuildWindows64Player", &__self_0),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for BuildArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::ActiveBuildProfile(_0) => {
|
|
match &format_args!("activeBuildProfile \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Build(_0) => {
|
|
match &format_args!("build \"{0}\"", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::BuildLinux64Player(_0) => {
|
|
match &format_args!("buildLinux64Player \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::BuildLinuxHeadlessSimulation(_0) => {
|
|
match &format_args!("buildLinuxHeadlessSimulation \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::BuildOsxUniversalPlayer(_0) => {
|
|
match &format_args!("buildOSXUniversalPlayer \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::BuildTarget(_0) => {
|
|
match &format_args!("buildTarget \"{0}\"", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::StandaloneBuildSubtarget(_0) => {
|
|
match &format_args!("standaloneBuildSubtarget \"{0}\"", _0)
|
|
{
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::BuildWindowsPlayer(_0) => {
|
|
match &format_args!("buildWindowsPlayer \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::BuildWindows64Player(_0) => {
|
|
match &format_args!("buildWindows64Player \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for BuildArgument {
|
|
#[inline]
|
|
fn clone(&self) -> BuildArgument {
|
|
match self {
|
|
BuildArgument::ActiveBuildProfile(__self_0) =>
|
|
BuildArgument::ActiveBuildProfile(::core::clone::Clone::clone(__self_0)),
|
|
BuildArgument::Build(__self_0) =>
|
|
BuildArgument::Build(::core::clone::Clone::clone(__self_0)),
|
|
BuildArgument::BuildLinux64Player(__self_0) =>
|
|
BuildArgument::BuildLinux64Player(::core::clone::Clone::clone(__self_0)),
|
|
BuildArgument::BuildLinuxHeadlessSimulation(__self_0) =>
|
|
BuildArgument::BuildLinuxHeadlessSimulation(::core::clone::Clone::clone(__self_0)),
|
|
BuildArgument::BuildOsxUniversalPlayer(__self_0) =>
|
|
BuildArgument::BuildOsxUniversalPlayer(::core::clone::Clone::clone(__self_0)),
|
|
BuildArgument::BuildTarget(__self_0) =>
|
|
BuildArgument::BuildTarget(::core::clone::Clone::clone(__self_0)),
|
|
BuildArgument::StandaloneBuildSubtarget(__self_0) =>
|
|
BuildArgument::StandaloneBuildSubtarget(::core::clone::Clone::clone(__self_0)),
|
|
BuildArgument::BuildWindowsPlayer(__self_0) =>
|
|
BuildArgument::BuildWindowsPlayer(::core::clone::Clone::clone(__self_0)),
|
|
BuildArgument::BuildWindows64Player(__self_0) =>
|
|
BuildArgument::BuildWindows64Player(::core::clone::Clone::clone(__self_0)),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for BuildArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for BuildArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &BuildArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(BuildArgument::ActiveBuildProfile(__self_0),
|
|
BuildArgument::ActiveBuildProfile(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(BuildArgument::Build(__self_0),
|
|
BuildArgument::Build(__arg1_0)) => __self_0 == __arg1_0,
|
|
(BuildArgument::BuildLinux64Player(__self_0),
|
|
BuildArgument::BuildLinux64Player(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(BuildArgument::BuildLinuxHeadlessSimulation(__self_0),
|
|
BuildArgument::BuildLinuxHeadlessSimulation(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(BuildArgument::BuildOsxUniversalPlayer(__self_0),
|
|
BuildArgument::BuildOsxUniversalPlayer(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(BuildArgument::BuildTarget(__self_0),
|
|
BuildArgument::BuildTarget(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(BuildArgument::StandaloneBuildSubtarget(__self_0),
|
|
BuildArgument::StandaloneBuildSubtarget(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(BuildArgument::BuildWindowsPlayer(__self_0),
|
|
BuildArgument::BuildWindowsPlayer(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(BuildArgument::BuildWindows64Player(__self_0),
|
|
BuildArgument::BuildWindows64Player(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
_ => unsafe { ::core::intrinsics::unreachable() }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for BuildArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<PathBuf>;
|
|
let _: ::core::cmp::AssertParamIsEq<BuildTarget>;
|
|
let _: ::core::cmp::AssertParamIsEq<BuildSubtarget>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for BuildArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &BuildArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(BuildArgument::ActiveBuildProfile(__self_0),
|
|
BuildArgument::ActiveBuildProfile(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(BuildArgument::Build(__self_0),
|
|
BuildArgument::Build(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildLinux64Player(__self_0),
|
|
BuildArgument::BuildLinux64Player(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildLinuxHeadlessSimulation(__self_0),
|
|
BuildArgument::BuildLinuxHeadlessSimulation(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildOsxUniversalPlayer(__self_0),
|
|
BuildArgument::BuildOsxUniversalPlayer(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildTarget(__self_0),
|
|
BuildArgument::BuildTarget(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(BuildArgument::StandaloneBuildSubtarget(__self_0),
|
|
BuildArgument::StandaloneBuildSubtarget(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildWindowsPlayer(__self_0),
|
|
BuildArgument::BuildWindowsPlayer(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildWindows64Player(__self_0),
|
|
BuildArgument::BuildWindows64Player(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for BuildArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &BuildArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(BuildArgument::ActiveBuildProfile(__self_0),
|
|
BuildArgument::ActiveBuildProfile(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(BuildArgument::Build(__self_0),
|
|
BuildArgument::Build(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildLinux64Player(__self_0),
|
|
BuildArgument::BuildLinux64Player(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildLinuxHeadlessSimulation(__self_0),
|
|
BuildArgument::BuildLinuxHeadlessSimulation(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildOsxUniversalPlayer(__self_0),
|
|
BuildArgument::BuildOsxUniversalPlayer(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildTarget(__self_0),
|
|
BuildArgument::BuildTarget(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(BuildArgument::StandaloneBuildSubtarget(__self_0),
|
|
BuildArgument::StandaloneBuildSubtarget(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildWindowsPlayer(__self_0),
|
|
BuildArgument::BuildWindowsPlayer(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(BuildArgument::BuildWindows64Player(__self_0),
|
|
BuildArgument::BuildWindows64Player(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => unsafe { ::core::intrinsics::unreachable() }
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for BuildArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
BuildArgument::ActiveBuildProfile(_0) => {
|
|
f.write_str("activeBuildProfile \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
BuildArgument::Build(_0) => {
|
|
f.write_str("build \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
BuildArgument::BuildLinux64Player(_0) => {
|
|
f.write_str("buildLinux64Player \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
BuildArgument::BuildLinuxHeadlessSimulation(_0) => {
|
|
f.write_str("buildLinuxHeadlessSimulation \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
BuildArgument::BuildOsxUniversalPlayer(_0) => {
|
|
f.write_str("buildOSXUniversalPlayer \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
BuildArgument::BuildTarget(_0) => {
|
|
f.write_str("BuildTarget")?;
|
|
}
|
|
BuildArgument::StandaloneBuildSubtarget(_0) => {
|
|
f.write_str("standaloneBuildSubtarget \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
BuildArgument::BuildWindowsPlayer(_0) => {
|
|
f.write_str("buildWindowsPlayer \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
BuildArgument::BuildWindows64Player(_0) => {
|
|
f.write_str("buildWindows64Player \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum CacheServerArgument {
|
|
|
|
#[display("EnableCacheServer")]
|
|
Enable,
|
|
|
|
#[display("cacheServerEndpoint {_0}:{_1}")]
|
|
Endpoint(IpAddr, u16),
|
|
|
|
#[display("cacheServerNamespacePrefix \"{0}\"", _0.display())]
|
|
#[os_display("cacheServerNamespacePrefix \"{_0}\"")]
|
|
NamespacePrefix(OsString),
|
|
|
|
#[display("cacheServerEnableDownload {_0}")]
|
|
EnableDownload(bool),
|
|
|
|
#[display("cacheServerEnableUpload {_0}")]
|
|
EnableUpload(bool),
|
|
|
|
#[display("cacheServerWaitForConnection {0}", _0.as_millis())]
|
|
WaitForConnection(Duration),
|
|
|
|
#[display("cacheServerWaitForUploadCompletion")]
|
|
WaitForUploadCompletion,
|
|
|
|
#[display("cacheServerDownloadBatchSize {_0}")]
|
|
DownloadBatchSize(usize),
|
|
|
|
#[display("cacheServerUploadAllRevisions")]
|
|
UploadAllRevisions,
|
|
|
|
#[display("cacheServerUploadExistingShaderCache")]
|
|
UploadExistingShaderCache,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for CacheServerArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
CacheServerArgument::Enable =>
|
|
::core::fmt::Formatter::write_str(f, "Enable"),
|
|
CacheServerArgument::Endpoint(__self_0, __self_1) =>
|
|
::core::fmt::Formatter::debug_tuple_field2_finish(f,
|
|
"Endpoint", __self_0, &__self_1),
|
|
CacheServerArgument::NamespacePrefix(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"NamespacePrefix", &__self_0),
|
|
CacheServerArgument::EnableDownload(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"EnableDownload", &__self_0),
|
|
CacheServerArgument::EnableUpload(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"EnableUpload", &__self_0),
|
|
CacheServerArgument::WaitForConnection(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"WaitForConnection", &__self_0),
|
|
CacheServerArgument::WaitForUploadCompletion =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"WaitForUploadCompletion"),
|
|
CacheServerArgument::DownloadBatchSize(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"DownloadBatchSize", &__self_0),
|
|
CacheServerArgument::UploadAllRevisions =>
|
|
::core::fmt::Formatter::write_str(f, "UploadAllRevisions"),
|
|
CacheServerArgument::UploadExistingShaderCache =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"UploadExistingShaderCache"),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for CacheServerArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::Enable => {
|
|
match &format_args!("EnableCacheServer") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Endpoint(_0, _1) => {
|
|
match &format_args!("cacheServerEndpoint {0}:{1}", _0, _1) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::NamespacePrefix(_0) => {
|
|
match &format_args!("cacheServerNamespacePrefix \"{0}\"",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::EnableDownload(_0) => {
|
|
match &format_args!("cacheServerEnableDownload {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::EnableUpload(_0) => {
|
|
match &format_args!("cacheServerEnableUpload {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::WaitForConnection(_0) => {
|
|
match &format_args!("cacheServerWaitForConnection {0}",
|
|
_0.as_millis()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::WaitForUploadCompletion => {
|
|
match &format_args!("cacheServerWaitForUploadCompletion") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::DownloadBatchSize(_0) => {
|
|
match &format_args!("cacheServerDownloadBatchSize {0}", _0)
|
|
{
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::UploadAllRevisions => {
|
|
match &format_args!("cacheServerUploadAllRevisions") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::UploadExistingShaderCache => {
|
|
match &format_args!("cacheServerUploadExistingShaderCache")
|
|
{
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for CacheServerArgument {
|
|
#[inline]
|
|
fn clone(&self) -> CacheServerArgument {
|
|
match self {
|
|
CacheServerArgument::Enable => CacheServerArgument::Enable,
|
|
CacheServerArgument::Endpoint(__self_0, __self_1) =>
|
|
CacheServerArgument::Endpoint(::core::clone::Clone::clone(__self_0),
|
|
::core::clone::Clone::clone(__self_1)),
|
|
CacheServerArgument::NamespacePrefix(__self_0) =>
|
|
CacheServerArgument::NamespacePrefix(::core::clone::Clone::clone(__self_0)),
|
|
CacheServerArgument::EnableDownload(__self_0) =>
|
|
CacheServerArgument::EnableDownload(::core::clone::Clone::clone(__self_0)),
|
|
CacheServerArgument::EnableUpload(__self_0) =>
|
|
CacheServerArgument::EnableUpload(::core::clone::Clone::clone(__self_0)),
|
|
CacheServerArgument::WaitForConnection(__self_0) =>
|
|
CacheServerArgument::WaitForConnection(::core::clone::Clone::clone(__self_0)),
|
|
CacheServerArgument::WaitForUploadCompletion =>
|
|
CacheServerArgument::WaitForUploadCompletion,
|
|
CacheServerArgument::DownloadBatchSize(__self_0) =>
|
|
CacheServerArgument::DownloadBatchSize(::core::clone::Clone::clone(__self_0)),
|
|
CacheServerArgument::UploadAllRevisions =>
|
|
CacheServerArgument::UploadAllRevisions,
|
|
CacheServerArgument::UploadExistingShaderCache =>
|
|
CacheServerArgument::UploadExistingShaderCache,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for CacheServerArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for CacheServerArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &CacheServerArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(CacheServerArgument::Endpoint(__self_0, __self_1),
|
|
CacheServerArgument::Endpoint(__arg1_0, __arg1_1)) =>
|
|
__self_1 == __arg1_1 && __self_0 == __arg1_0,
|
|
(CacheServerArgument::NamespacePrefix(__self_0),
|
|
CacheServerArgument::NamespacePrefix(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(CacheServerArgument::EnableDownload(__self_0),
|
|
CacheServerArgument::EnableDownload(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(CacheServerArgument::EnableUpload(__self_0),
|
|
CacheServerArgument::EnableUpload(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(CacheServerArgument::WaitForConnection(__self_0),
|
|
CacheServerArgument::WaitForConnection(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(CacheServerArgument::DownloadBatchSize(__self_0),
|
|
CacheServerArgument::DownloadBatchSize(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
_ => true,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for CacheServerArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<IpAddr>;
|
|
let _: ::core::cmp::AssertParamIsEq<u16>;
|
|
let _: ::core::cmp::AssertParamIsEq<OsString>;
|
|
let _: ::core::cmp::AssertParamIsEq<bool>;
|
|
let _: ::core::cmp::AssertParamIsEq<Duration>;
|
|
let _: ::core::cmp::AssertParamIsEq<usize>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for CacheServerArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &CacheServerArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(CacheServerArgument::Endpoint(__self_0, __self_1),
|
|
CacheServerArgument::Endpoint(__arg1_0, __arg1_1)) =>
|
|
match ::core::cmp::PartialOrd::partial_cmp(__self_0,
|
|
__arg1_0) {
|
|
::core::option::Option::Some(::core::cmp::Ordering::Equal)
|
|
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
|
|
cmp => cmp,
|
|
},
|
|
(CacheServerArgument::NamespacePrefix(__self_0),
|
|
CacheServerArgument::NamespacePrefix(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(CacheServerArgument::EnableDownload(__self_0),
|
|
CacheServerArgument::EnableDownload(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(CacheServerArgument::EnableUpload(__self_0),
|
|
CacheServerArgument::EnableUpload(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(CacheServerArgument::WaitForConnection(__self_0),
|
|
CacheServerArgument::WaitForConnection(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(CacheServerArgument::DownloadBatchSize(__self_0),
|
|
CacheServerArgument::DownloadBatchSize(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for CacheServerArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &CacheServerArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(CacheServerArgument::Endpoint(__self_0, __self_1),
|
|
CacheServerArgument::Endpoint(__arg1_0, __arg1_1)) =>
|
|
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
|
|
::core::cmp::Ordering::Equal =>
|
|
::core::cmp::Ord::cmp(__self_1, __arg1_1),
|
|
cmp => cmp,
|
|
},
|
|
(CacheServerArgument::NamespacePrefix(__self_0),
|
|
CacheServerArgument::NamespacePrefix(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(CacheServerArgument::EnableDownload(__self_0),
|
|
CacheServerArgument::EnableDownload(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(CacheServerArgument::EnableUpload(__self_0),
|
|
CacheServerArgument::EnableUpload(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(CacheServerArgument::WaitForConnection(__self_0),
|
|
CacheServerArgument::WaitForConnection(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(CacheServerArgument::DownloadBatchSize(__self_0),
|
|
CacheServerArgument::DownloadBatchSize(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => ::core::cmp::Ordering::Equal,
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for CacheServerArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
CacheServerArgument::NamespacePrefix(_0) => {
|
|
f.write_str("cacheServerNamespacePrefix \"")?;
|
|
(_0).fmt_os(f)?;
|
|
f.write_str("\"")?;
|
|
}
|
|
_ => { f.write_str(&self.to_string())? }
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
#[os_display(from_display)]
|
|
pub enum StackTraceLogType {
|
|
None,
|
|
|
|
#[display("\"Script Only\"")]
|
|
ScriptOnly,
|
|
|
|
#[default]
|
|
Full,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for StackTraceLogType {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
StackTraceLogType::None => "None",
|
|
StackTraceLogType::ScriptOnly => "ScriptOnly",
|
|
StackTraceLogType::Full => "Full",
|
|
})
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::default::Default for StackTraceLogType {
|
|
#[inline]
|
|
fn default() -> StackTraceLogType { Self::Full }
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for StackTraceLogType {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::None => { __derive_more_f.write_str("None") }
|
|
Self::ScriptOnly => {
|
|
__derive_more_f.write_fmt(format_args!("\"Script Only\""))
|
|
}
|
|
Self::Full => { __derive_more_f.write_str("Full") }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for StackTraceLogType {
|
|
#[inline]
|
|
fn clone(&self) -> StackTraceLogType { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for StackTraceLogType { }
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for StackTraceLogType { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for StackTraceLogType {
|
|
#[inline]
|
|
fn eq(&self, other: &StackTraceLogType) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for StackTraceLogType {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for StackTraceLogType {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &StackTraceLogType)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for StackTraceLogType {
|
|
#[inline]
|
|
fn cmp(&self, other: &StackTraceLogType) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for StackTraceLogType {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum DebugArgument {
|
|
|
|
#[display("disableManagedDebugger")]
|
|
DisableManagedDebugger,
|
|
|
|
#[display("diag-debug-shader-compiler")]
|
|
DiagDebugShaderCompiler,
|
|
|
|
#[display("debugCodeOptimization")]
|
|
DebugCodeOptimization,
|
|
|
|
#[display("enableCodeCoverage")]
|
|
EnableCodeCoverage,
|
|
|
|
#[display("force-d3d12-debug")]
|
|
ForceD3d12Debug,
|
|
|
|
#[display("force-d3d12-debug-gbv")]
|
|
ForceD3d12DebugGbv,
|
|
|
|
#[display("force-vulkan-layers")]
|
|
ForceVulkanLayers,
|
|
|
|
#[display("StackTraceLogType {_0}")]
|
|
#[os_display("StackTraceLogType {_0}")]
|
|
StackTraceLogType(StackTraceLogType),
|
|
|
|
#[display("log-memory-performance-stats")]
|
|
LogMemoryPerformanceStats,
|
|
|
|
#[display("wait-for-managed-debugger")]
|
|
WaitForManagedDebugger,
|
|
|
|
#[display("wait-for-native-debugger")]
|
|
WaitForNativeDebugger,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for DebugArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
DebugArgument::DisableManagedDebugger =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"DisableManagedDebugger"),
|
|
DebugArgument::DiagDebugShaderCompiler =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"DiagDebugShaderCompiler"),
|
|
DebugArgument::DebugCodeOptimization =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"DebugCodeOptimization"),
|
|
DebugArgument::EnableCodeCoverage =>
|
|
::core::fmt::Formatter::write_str(f, "EnableCodeCoverage"),
|
|
DebugArgument::ForceD3d12Debug =>
|
|
::core::fmt::Formatter::write_str(f, "ForceD3d12Debug"),
|
|
DebugArgument::ForceD3d12DebugGbv =>
|
|
::core::fmt::Formatter::write_str(f, "ForceD3d12DebugGbv"),
|
|
DebugArgument::ForceVulkanLayers =>
|
|
::core::fmt::Formatter::write_str(f, "ForceVulkanLayers"),
|
|
DebugArgument::StackTraceLogType(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"StackTraceLogType", &__self_0),
|
|
DebugArgument::LogMemoryPerformanceStats =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"LogMemoryPerformanceStats"),
|
|
DebugArgument::WaitForManagedDebugger =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"WaitForManagedDebugger"),
|
|
DebugArgument::WaitForNativeDebugger =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"WaitForNativeDebugger"),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for DebugArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::DisableManagedDebugger => {
|
|
match &format_args!("disableManagedDebugger") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::DiagDebugShaderCompiler => {
|
|
match &format_args!("diag-debug-shader-compiler") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::DebugCodeOptimization => {
|
|
match &format_args!("debugCodeOptimization") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::EnableCodeCoverage => {
|
|
match &format_args!("enableCodeCoverage") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceD3d12Debug => {
|
|
match &format_args!("force-d3d12-debug") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceD3d12DebugGbv => {
|
|
match &format_args!("force-d3d12-debug-gbv") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceVulkanLayers => {
|
|
match &format_args!("force-vulkan-layers") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::StackTraceLogType(_0) => {
|
|
match &format_args!("StackTraceLogType {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::LogMemoryPerformanceStats => {
|
|
match &format_args!("log-memory-performance-stats") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::WaitForManagedDebugger => {
|
|
match &format_args!("wait-for-managed-debugger") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::WaitForNativeDebugger => {
|
|
match &format_args!("wait-for-native-debugger") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for DebugArgument {
|
|
#[inline]
|
|
fn clone(&self) -> DebugArgument {
|
|
let _: ::core::clone::AssertParamIsClone<StackTraceLogType>;
|
|
*self
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for DebugArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for DebugArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for DebugArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &DebugArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(DebugArgument::StackTraceLogType(__self_0),
|
|
DebugArgument::StackTraceLogType(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
_ => true,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for DebugArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<StackTraceLogType>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for DebugArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &DebugArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(DebugArgument::StackTraceLogType(__self_0),
|
|
DebugArgument::StackTraceLogType(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for DebugArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &DebugArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(DebugArgument::StackTraceLogType(__self_0),
|
|
DebugArgument::StackTraceLogType(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => ::core::cmp::Ordering::Equal,
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for DebugArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
DebugArgument::StackTraceLogType(_0) => {
|
|
f.write_str("StackTraceLogType ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
_ => { f.write_str(&self.to_string())? }
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum GraphicsApiArgument {
|
|
|
|
#[display("force-clamped")]
|
|
ForceClamped,
|
|
|
|
#[display("force-d3d11")]
|
|
ForceD3d11,
|
|
|
|
#[display("force-d3d12")]
|
|
ForceD3d12,
|
|
|
|
#[display("force-device-index")]
|
|
ForceDeviceIndex,
|
|
|
|
#[display("force-glcore")]
|
|
ForceGlCore,
|
|
|
|
#[display("force-glcoreXY")]
|
|
ForceGlCoreXy,
|
|
|
|
#[display("force-gles")]
|
|
ForceGlEs,
|
|
|
|
#[display("force-glesXY")]
|
|
ForceGlEsXy,
|
|
|
|
#[display("force-opengl")]
|
|
ForceOpenGl,
|
|
|
|
#[display("force-vulkan")]
|
|
ForceVulkan,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for GraphicsApiArgument {
|
|
#[inline]
|
|
fn clone(&self) -> GraphicsApiArgument { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for GraphicsApiArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for GraphicsApiArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
GraphicsApiArgument::ForceClamped => "ForceClamped",
|
|
GraphicsApiArgument::ForceD3d11 => "ForceD3d11",
|
|
GraphicsApiArgument::ForceD3d12 => "ForceD3d12",
|
|
GraphicsApiArgument::ForceDeviceIndex => "ForceDeviceIndex",
|
|
GraphicsApiArgument::ForceGlCore => "ForceGlCore",
|
|
GraphicsApiArgument::ForceGlCoreXy => "ForceGlCoreXy",
|
|
GraphicsApiArgument::ForceGlEs => "ForceGlEs",
|
|
GraphicsApiArgument::ForceGlEsXy => "ForceGlEsXy",
|
|
GraphicsApiArgument::ForceOpenGl => "ForceOpenGl",
|
|
GraphicsApiArgument::ForceVulkan => "ForceVulkan",
|
|
})
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for GraphicsApiArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::ForceClamped => {
|
|
match &format_args!("force-clamped") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceD3d11 => {
|
|
match &format_args!("force-d3d11") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceD3d12 => {
|
|
match &format_args!("force-d3d12") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceDeviceIndex => {
|
|
match &format_args!("force-device-index") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceGlCore => {
|
|
match &format_args!("force-glcore") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceGlCoreXy => {
|
|
match &format_args!("force-glcoreXY") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceGlEs => {
|
|
match &format_args!("force-gles") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceGlEsXy => {
|
|
match &format_args!("force-glesXY") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceOpenGl => {
|
|
match &format_args!("force-opengl") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceVulkan => {
|
|
match &format_args!("force-vulkan") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for GraphicsApiArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for GraphicsApiArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &GraphicsApiArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for GraphicsApiArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for GraphicsApiArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &GraphicsApiArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for GraphicsApiArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &GraphicsApiArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for GraphicsApiArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum LicenseArgument {
|
|
|
|
#[display("createManualActivationFile")]
|
|
CreateManualActivationFile,
|
|
|
|
#[display("manualLicenseFile {0}", _0.display())]
|
|
#[os_display("manualLicenseFile {_0}")]
|
|
ManualLicenseFile(PathBuf),
|
|
|
|
#[display("returnlicense")]
|
|
ReturnLicense,
|
|
|
|
#[display("serial {0}", _0.display())]
|
|
#[os_display("serial {_0}")]
|
|
Serial(OsString),
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for LicenseArgument {
|
|
#[inline]
|
|
fn clone(&self) -> LicenseArgument {
|
|
match self {
|
|
LicenseArgument::CreateManualActivationFile =>
|
|
LicenseArgument::CreateManualActivationFile,
|
|
LicenseArgument::ManualLicenseFile(__self_0) =>
|
|
LicenseArgument::ManualLicenseFile(::core::clone::Clone::clone(__self_0)),
|
|
LicenseArgument::ReturnLicense =>
|
|
LicenseArgument::ReturnLicense,
|
|
LicenseArgument::Serial(__self_0) =>
|
|
LicenseArgument::Serial(::core::clone::Clone::clone(__self_0)),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for LicenseArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
LicenseArgument::CreateManualActivationFile =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"CreateManualActivationFile"),
|
|
LicenseArgument::ManualLicenseFile(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"ManualLicenseFile", &__self_0),
|
|
LicenseArgument::ReturnLicense =>
|
|
::core::fmt::Formatter::write_str(f, "ReturnLicense"),
|
|
LicenseArgument::Serial(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Serial", &__self_0),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for LicenseArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::CreateManualActivationFile => {
|
|
match &format_args!("createManualActivationFile") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ManualLicenseFile(_0) => {
|
|
match &format_args!("manualLicenseFile {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ReturnLicense => {
|
|
match &format_args!("returnlicense") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Serial(_0) => {
|
|
match &format_args!("serial {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for LicenseArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for LicenseArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &LicenseArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(LicenseArgument::ManualLicenseFile(__self_0),
|
|
LicenseArgument::ManualLicenseFile(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(LicenseArgument::Serial(__self_0),
|
|
LicenseArgument::Serial(__arg1_0)) => __self_0 == __arg1_0,
|
|
_ => true,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for LicenseArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<PathBuf>;
|
|
let _: ::core::cmp::AssertParamIsEq<OsString>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for LicenseArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &LicenseArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(LicenseArgument::ManualLicenseFile(__self_0),
|
|
LicenseArgument::ManualLicenseFile(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(LicenseArgument::Serial(__self_0),
|
|
LicenseArgument::Serial(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for LicenseArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &LicenseArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(LicenseArgument::ManualLicenseFile(__self_0),
|
|
LicenseArgument::ManualLicenseFile(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(LicenseArgument::Serial(__self_0),
|
|
LicenseArgument::Serial(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => ::core::cmp::Ordering::Equal,
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for LicenseArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
LicenseArgument::ManualLicenseFile(_0) => {
|
|
f.write_str("manualLicenseFile ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
LicenseArgument::Serial(_0) => {
|
|
f.write_str("serial ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
_ => { f.write_str(&self.to_string())? }
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum MetalArgument {
|
|
|
|
#[display("force-low-power-device")]
|
|
ForceLowPowerDevice,
|
|
|
|
#[display("force-metal")]
|
|
ForceMetal,
|
|
|
|
#[display("enable-metal-capture")]
|
|
EnableMetalCapture,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for MetalArgument {
|
|
#[inline]
|
|
fn clone(&self) -> MetalArgument { *self }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::Copy for MetalArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for MetalArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f,
|
|
match self {
|
|
MetalArgument::ForceLowPowerDevice => "ForceLowPowerDevice",
|
|
MetalArgument::ForceMetal => "ForceMetal",
|
|
MetalArgument::EnableMetalCapture => "EnableMetalCapture",
|
|
})
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for MetalArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::ForceLowPowerDevice => {
|
|
match &format_args!("force-low-power-device") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::ForceMetal => {
|
|
match &format_args!("force-metal") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::EnableMetalCapture => {
|
|
match &format_args!("enable-metal-capture") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for MetalArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for MetalArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &MetalArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for MetalArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for MetalArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &MetalArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for MetalArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &MetalArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for MetalArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self { _ => { f.write_str(&self.to_string())? } }
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum ProfilerArgument {
|
|
|
|
#[display("deepprofiling")]
|
|
DeepProfiling,
|
|
|
|
#[display("profiler-enable")]
|
|
Enable,
|
|
|
|
#[display("profiler-log-file {0}", _0.display())]
|
|
#[os_display("profiler-log-file {_0}")]
|
|
LogFile(PathBuf),
|
|
|
|
#[display("profiler-capture-frame-count {_0}")]
|
|
CaptureFrameCount(usize),
|
|
|
|
#[display("profiler-maxusedmemory {_0}")]
|
|
MaxUsedMemory(usize),
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for ProfilerArgument {
|
|
#[inline]
|
|
fn clone(&self) -> ProfilerArgument {
|
|
match self {
|
|
ProfilerArgument::DeepProfiling =>
|
|
ProfilerArgument::DeepProfiling,
|
|
ProfilerArgument::Enable => ProfilerArgument::Enable,
|
|
ProfilerArgument::LogFile(__self_0) =>
|
|
ProfilerArgument::LogFile(::core::clone::Clone::clone(__self_0)),
|
|
ProfilerArgument::CaptureFrameCount(__self_0) =>
|
|
ProfilerArgument::CaptureFrameCount(::core::clone::Clone::clone(__self_0)),
|
|
ProfilerArgument::MaxUsedMemory(__self_0) =>
|
|
ProfilerArgument::MaxUsedMemory(::core::clone::Clone::clone(__self_0)),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for ProfilerArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
ProfilerArgument::DeepProfiling =>
|
|
::core::fmt::Formatter::write_str(f, "DeepProfiling"),
|
|
ProfilerArgument::Enable =>
|
|
::core::fmt::Formatter::write_str(f, "Enable"),
|
|
ProfilerArgument::LogFile(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"LogFile", &__self_0),
|
|
ProfilerArgument::CaptureFrameCount(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"CaptureFrameCount", &__self_0),
|
|
ProfilerArgument::MaxUsedMemory(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"MaxUsedMemory", &__self_0),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for ProfilerArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::DeepProfiling => {
|
|
match &format_args!("deepprofiling") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::Enable => {
|
|
match &format_args!("profiler-enable") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::LogFile(_0) => {
|
|
match &format_args!("profiler-log-file {0}", _0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::CaptureFrameCount(_0) => {
|
|
match &format_args!("profiler-capture-frame-count {0}", _0)
|
|
{
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::MaxUsedMemory(_0) => {
|
|
match &format_args!("profiler-maxusedmemory {0}", _0) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for ProfilerArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for ProfilerArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &ProfilerArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(ProfilerArgument::LogFile(__self_0),
|
|
ProfilerArgument::LogFile(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ProfilerArgument::CaptureFrameCount(__self_0),
|
|
ProfilerArgument::CaptureFrameCount(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(ProfilerArgument::MaxUsedMemory(__self_0),
|
|
ProfilerArgument::MaxUsedMemory(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
_ => true,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for ProfilerArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<PathBuf>;
|
|
let _: ::core::cmp::AssertParamIsEq<usize>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for ProfilerArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &ProfilerArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(ProfilerArgument::LogFile(__self_0),
|
|
ProfilerArgument::LogFile(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ProfilerArgument::CaptureFrameCount(__self_0),
|
|
ProfilerArgument::CaptureFrameCount(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(ProfilerArgument::MaxUsedMemory(__self_0),
|
|
ProfilerArgument::MaxUsedMemory(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for ProfilerArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &ProfilerArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(ProfilerArgument::LogFile(__self_0),
|
|
ProfilerArgument::LogFile(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ProfilerArgument::CaptureFrameCount(__self_0),
|
|
ProfilerArgument::CaptureFrameCount(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(ProfilerArgument::MaxUsedMemory(__self_0),
|
|
ProfilerArgument::MaxUsedMemory(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => ::core::cmp::Ordering::Equal,
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for ProfilerArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
ProfilerArgument::LogFile(_0) => {
|
|
f.write_str("profiler-log-file ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
_ => { f.write_str(&self.to_string())? }
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
#[display("-{_variant}")]
|
|
#[os_display(from_display)]
|
|
pub enum EditorSpecialArgument {
|
|
|
|
#[display("enableIncompatibleAssetDowngrade")]
|
|
EnableIncompatibleAssetDowngrade,
|
|
|
|
#[display("giCustomCacheLocation {0}", _0.display())]
|
|
#[os_display("giCustomCacheLocation {_0}")]
|
|
GiCustomCacheLocation(PathBuf),
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for EditorSpecialArgument {
|
|
#[inline]
|
|
fn clone(&self) -> EditorSpecialArgument {
|
|
match self {
|
|
EditorSpecialArgument::EnableIncompatibleAssetDowngrade =>
|
|
EditorSpecialArgument::EnableIncompatibleAssetDowngrade,
|
|
EditorSpecialArgument::GiCustomCacheLocation(__self_0) =>
|
|
EditorSpecialArgument::GiCustomCacheLocation(::core::clone::Clone::clone(__self_0)),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for EditorSpecialArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
EditorSpecialArgument::EnableIncompatibleAssetDowngrade =>
|
|
::core::fmt::Formatter::write_str(f,
|
|
"EnableIncompatibleAssetDowngrade"),
|
|
EditorSpecialArgument::GiCustomCacheLocation(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"GiCustomCacheLocation", &__self_0),
|
|
}
|
|
}
|
|
}
|
|
#[allow(unreachable_code)]
|
|
#[automatically_derived]
|
|
impl derive_more::core::fmt::Display for EditorSpecialArgument {
|
|
fn fmt(&self,
|
|
__derive_more_f: &mut derive_more::core::fmt::Formatter<'_>)
|
|
-> derive_more::core::fmt::Result {
|
|
match self {
|
|
Self::EnableIncompatibleAssetDowngrade => {
|
|
match &format_args!("enableIncompatibleAssetDowngrade") {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
Self::GiCustomCacheLocation(_0) => {
|
|
match &format_args!("giCustomCacheLocation {0}",
|
|
_0.display()) {
|
|
_variant =>
|
|
__derive_more_f.write_fmt(format_args!("-{0}", _variant)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for EditorSpecialArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for EditorSpecialArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &EditorSpecialArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(EditorSpecialArgument::GiCustomCacheLocation(__self_0),
|
|
EditorSpecialArgument::GiCustomCacheLocation(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
_ => true,
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for EditorSpecialArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<PathBuf>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for EditorSpecialArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &EditorSpecialArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(EditorSpecialArgument::GiCustomCacheLocation(__self_0),
|
|
EditorSpecialArgument::GiCustomCacheLocation(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for EditorSpecialArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &EditorSpecialArgument)
|
|
-> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(EditorSpecialArgument::GiCustomCacheLocation(__self_0),
|
|
EditorSpecialArgument::GiCustomCacheLocation(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => ::core::cmp::Ordering::Equal,
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
impl osstr_traits::OsDisplay for EditorSpecialArgument {
|
|
fn fmt_os(&self, f: &mut osstr_traits::OsStringFormatter)
|
|
-> std::fmt::Result {
|
|
match self {
|
|
EditorSpecialArgument::GiCustomCacheLocation(_0) => {
|
|
f.write_str("giCustomCacheLocation ")?;
|
|
(_0).fmt_os(f)?;
|
|
}
|
|
_ => { f.write_str(&self.to_string())? }
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|
|
pub enum UnityArgument {
|
|
Configuration(ConfigurationArgument),
|
|
BatchMode(BatchModeArgument),
|
|
Build(BuildArgument),
|
|
CacheServer(CacheServerArgument),
|
|
Debug(DebugArgument),
|
|
GraphicsApi(GraphicsApiArgument),
|
|
License(LicenseArgument),
|
|
Metal(MetalArgument),
|
|
Profiler(ProfilerArgument),
|
|
Editor(EditorSpecialArgument),
|
|
Extra(OsString),
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for UnityArgument {
|
|
#[inline]
|
|
fn clone(&self) -> UnityArgument {
|
|
match self {
|
|
UnityArgument::Configuration(__self_0) =>
|
|
UnityArgument::Configuration(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::BatchMode(__self_0) =>
|
|
UnityArgument::BatchMode(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::Build(__self_0) =>
|
|
UnityArgument::Build(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::CacheServer(__self_0) =>
|
|
UnityArgument::CacheServer(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::Debug(__self_0) =>
|
|
UnityArgument::Debug(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::GraphicsApi(__self_0) =>
|
|
UnityArgument::GraphicsApi(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::License(__self_0) =>
|
|
UnityArgument::License(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::Metal(__self_0) =>
|
|
UnityArgument::Metal(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::Profiler(__self_0) =>
|
|
UnityArgument::Profiler(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::Editor(__self_0) =>
|
|
UnityArgument::Editor(::core::clone::Clone::clone(__self_0)),
|
|
UnityArgument::Extra(__self_0) =>
|
|
UnityArgument::Extra(::core::clone::Clone::clone(__self_0)),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for UnityArgument {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
UnityArgument::Configuration(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Configuration", &__self_0),
|
|
UnityArgument::BatchMode(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"BatchMode", &__self_0),
|
|
UnityArgument::Build(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Build", &__self_0),
|
|
UnityArgument::CacheServer(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"CacheServer", &__self_0),
|
|
UnityArgument::Debug(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Debug", &__self_0),
|
|
UnityArgument::GraphicsApi(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"GraphicsApi", &__self_0),
|
|
UnityArgument::License(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"License", &__self_0),
|
|
UnityArgument::Metal(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Metal", &__self_0),
|
|
UnityArgument::Profiler(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Profiler", &__self_0),
|
|
UnityArgument::Editor(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Editor", &__self_0),
|
|
UnityArgument::Extra(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Extra", &__self_0),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for UnityArgument { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for UnityArgument {
|
|
#[inline]
|
|
fn eq(&self, other: &UnityArgument) -> bool {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
__self_discr == __arg1_discr &&
|
|
match (self, other) {
|
|
(UnityArgument::Configuration(__self_0),
|
|
UnityArgument::Configuration(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(UnityArgument::BatchMode(__self_0),
|
|
UnityArgument::BatchMode(__arg1_0)) => __self_0 == __arg1_0,
|
|
(UnityArgument::Build(__self_0),
|
|
UnityArgument::Build(__arg1_0)) => __self_0 == __arg1_0,
|
|
(UnityArgument::CacheServer(__self_0),
|
|
UnityArgument::CacheServer(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(UnityArgument::Debug(__self_0),
|
|
UnityArgument::Debug(__arg1_0)) => __self_0 == __arg1_0,
|
|
(UnityArgument::GraphicsApi(__self_0),
|
|
UnityArgument::GraphicsApi(__arg1_0)) =>
|
|
__self_0 == __arg1_0,
|
|
(UnityArgument::License(__self_0),
|
|
UnityArgument::License(__arg1_0)) => __self_0 == __arg1_0,
|
|
(UnityArgument::Metal(__self_0),
|
|
UnityArgument::Metal(__arg1_0)) => __self_0 == __arg1_0,
|
|
(UnityArgument::Profiler(__self_0),
|
|
UnityArgument::Profiler(__arg1_0)) => __self_0 == __arg1_0,
|
|
(UnityArgument::Editor(__self_0),
|
|
UnityArgument::Editor(__arg1_0)) => __self_0 == __arg1_0,
|
|
(UnityArgument::Extra(__self_0),
|
|
UnityArgument::Extra(__arg1_0)) => __self_0 == __arg1_0,
|
|
_ => unsafe { ::core::intrinsics::unreachable() }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for UnityArgument {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<ConfigurationArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<BatchModeArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<BuildArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<CacheServerArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<DebugArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<GraphicsApiArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<LicenseArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<MetalArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<ProfilerArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<EditorSpecialArgument>;
|
|
let _: ::core::cmp::AssertParamIsEq<OsString>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for UnityArgument {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &UnityArgument)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match (self, other) {
|
|
(UnityArgument::Configuration(__self_0),
|
|
UnityArgument::Configuration(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::BatchMode(__self_0),
|
|
UnityArgument::BatchMode(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Build(__self_0),
|
|
UnityArgument::Build(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::CacheServer(__self_0),
|
|
UnityArgument::CacheServer(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Debug(__self_0),
|
|
UnityArgument::Debug(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::GraphicsApi(__self_0),
|
|
UnityArgument::GraphicsApi(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::License(__self_0),
|
|
UnityArgument::License(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Metal(__self_0),
|
|
UnityArgument::Metal(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Profiler(__self_0),
|
|
UnityArgument::Profiler(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Editor(__self_0),
|
|
UnityArgument::Editor(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Extra(__self_0),
|
|
UnityArgument::Extra(__arg1_0)) =>
|
|
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
|
|
_ =>
|
|
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
|
|
&__arg1_discr),
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for UnityArgument {
|
|
#[inline]
|
|
fn cmp(&self, other: &UnityArgument) -> ::core::cmp::Ordering {
|
|
let __self_discr = ::core::intrinsics::discriminant_value(self);
|
|
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
|
|
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
|
|
::core::cmp::Ordering::Equal =>
|
|
match (self, other) {
|
|
(UnityArgument::Configuration(__self_0),
|
|
UnityArgument::Configuration(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::BatchMode(__self_0),
|
|
UnityArgument::BatchMode(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Build(__self_0),
|
|
UnityArgument::Build(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::CacheServer(__self_0),
|
|
UnityArgument::CacheServer(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Debug(__self_0),
|
|
UnityArgument::Debug(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::GraphicsApi(__self_0),
|
|
UnityArgument::GraphicsApi(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::License(__self_0),
|
|
UnityArgument::License(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Metal(__self_0),
|
|
UnityArgument::Metal(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Profiler(__self_0),
|
|
UnityArgument::Profiler(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Editor(__self_0),
|
|
UnityArgument::Editor(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
(UnityArgument::Extra(__self_0),
|
|
UnityArgument::Extra(__arg1_0)) =>
|
|
::core::cmp::Ord::cmp(__self_0, __arg1_0),
|
|
_ => unsafe { ::core::intrinsics::unreachable() }
|
|
},
|
|
cmp => cmp,
|
|
}
|
|
}
|
|
}
|
|
pub struct UnityArguments(Vec<UnityArgument>);
|
|
#[automatically_derived]
|
|
impl ::core::clone::Clone for UnityArguments {
|
|
#[inline]
|
|
fn clone(&self) -> UnityArguments {
|
|
UnityArguments(::core::clone::Clone::clone(&self.0))
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for UnityArguments {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"UnityArguments", &&self.0)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::marker::StructuralPartialEq for UnityArguments { }
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialEq for UnityArguments {
|
|
#[inline]
|
|
fn eq(&self, other: &UnityArguments) -> bool { self.0 == other.0 }
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Eq for UnityArguments {
|
|
#[inline]
|
|
#[doc(hidden)]
|
|
#[coverage(off)]
|
|
fn assert_receiver_is_total_eq(&self) -> () {
|
|
let _: ::core::cmp::AssertParamIsEq<Vec<UnityArgument>>;
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::PartialOrd for UnityArguments {
|
|
#[inline]
|
|
fn partial_cmp(&self, other: &UnityArguments)
|
|
-> ::core::option::Option<::core::cmp::Ordering> {
|
|
::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::cmp::Ord for UnityArguments {
|
|
#[inline]
|
|
fn cmp(&self, other: &UnityArguments) -> ::core::cmp::Ordering {
|
|
::core::cmp::Ord::cmp(&self.0, &other.0)
|
|
}
|
|
}
|
|
impl Deref for UnityArguments {
|
|
type Target = Vec<UnityArgument>;
|
|
fn deref(&self) -> &Self::Target { &self.0 }
|
|
}
|
|
impl DerefMut for UnityArguments {
|
|
fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 }
|
|
}
|
|
impl Default for UnityArguments {
|
|
fn default() -> Self { Self(Vec::new()) }
|
|
}
|
|
macro_rules! unity_args {
|
|
() => { UnityArguments::default() };
|
|
($arg:expr $(, $rest:expr)* $(,)?) =>
|
|
{
|
|
{
|
|
let mut args = Vec::new();
|
|
$(#[allow(unreachable_patterns)] match $rest
|
|
{
|
|
arg @ ConfigArguments::CreateProject(_) | arg @
|
|
ConfigArguments::ConsistencyCheck | arg @
|
|
ConfigArguments::ConsistencyCheckSourceMode(_) | arg @
|
|
ConfigArguments::DisableAssemblyUpdater(_) | arg @
|
|
ConfigArguments::DisableGpuSkinning | arg @
|
|
ConfigArguments::DisablePlaybackEngines(_) | arg @
|
|
ConfigArguments::ExecMethod(_) | arg @
|
|
ConfigArguments::ExportPackage(_) | arg @
|
|
ConfigArguments::ImportPackage(_) | arg @
|
|
ConfigArguments::JobWorkerCount(_) | arg @
|
|
ConfigArguments::GcHelperCount(_) | arg @
|
|
ConfigArguments::LogFile(_) | arg @ ConfigArguments::NoUpm |
|
|
arg @ ConfigArguments::OpenFile(_) | arg @
|
|
ConfigArguments::Password(_) | arg @
|
|
ConfigArguments::ProjectPath(_) | arg @
|
|
ConfigArguments::Quit | arg @
|
|
ConfigArguments::ReleaseCodeOptimization | arg @
|
|
ConfigArguments::SetDefaultPlatformTextureFormat | arg @
|
|
ConfigArguments::OverrideMaxTextureSize(_) | arg @
|
|
ConfigArguments::OverrideTextureCompression(_) | arg @
|
|
ConfigArguments::SilentCrashes | arg @
|
|
ConfigArguments::UpmLogFile(_) | arg @
|
|
ConfigArguments::Username(_) | arg @
|
|
ConfigArguments::VcsMode | arg @ ConfigArguments::Version |
|
|
arg @ ConfigArguments::Timestamps =>
|
|
{ args.push(UnityArgument::Configuration(arg)); }, arg @
|
|
BatchModeArguments::AcceptApiUpdate | arg @
|
|
BatchModeArguments::BatchMode | arg @
|
|
BatchModeArguments::IgnoreCompileErrors | arg @
|
|
BatchModeArguments::NoGraphics =>
|
|
{ args.push(UnityArgument::BatchMode(arg)); }, arg @
|
|
BuildArguments::ActiveBuildProfile(_) | arg @
|
|
BuildArguments::Build(_) | arg @
|
|
BuildArguments::BuildLinux64Player(_) | arg @
|
|
BuildArguments::BuildLinuxHeadlessSimulation(_) | arg @
|
|
BuildArguments::BuildOSXUniversalPlayer(_) | arg @
|
|
BuildArguments::BuildTarget(_) | arg @
|
|
BuildArguments::StandaloneBuildSubtarget(_) | arg @
|
|
BuildArguments::BuildWindowsPlayer(_) | arg @
|
|
BuildArguments::BuildWindows64Player(_) =>
|
|
{ args.push(UnityArgument::Build(arg)); }, arg @
|
|
CacheServerArguments::Enable | arg @
|
|
CacheServerArguments::Endpoint(_, _) | arg @
|
|
CacheServerArguments::NamespacePrefix(_) | arg @
|
|
CacheServerArguments::EnableDownload(_) | arg @
|
|
CacheServerArguments::EnableUpload(_) | arg @
|
|
CacheServerArguments::WaitForConnection(_) | arg @
|
|
CacheServerArguments::WaitForUploadCompletion | arg @
|
|
CacheServerArguments::DownloadBatchSize(_) | arg @
|
|
CacheServerArguments::UploadAllRevisions | arg @
|
|
CacheServerArguments::UploadExistingShaderCache =>
|
|
{ args.push(UnityArgument::CacheServer(arg)); }, arg @
|
|
DebugArguments::DisableManagedDebugger | arg @
|
|
DebugArguments::DiagDebugShaderCompiler | arg @
|
|
DebugArguments::DebugCodeOptimization | arg @
|
|
DebugArguments::EnableCodeCoverage | arg @
|
|
DebugArguments::ForceD3d12Debug | arg @
|
|
DebugArguments::ForceD3d12DebugGbv | arg @
|
|
DebugArguments::ForceVulkanLayers | arg @
|
|
DebugArguments::StackTraceLogType(_) | arg @
|
|
DebugArguments::LogMemoryPerformanceStats | arg @
|
|
DebugArguments::WaitForManagedDebugger | arg @
|
|
DebugArguments::WaitForNativeDebugger =>
|
|
{ args.push(UnityArgument::Debug(arg)); }, arg @
|
|
GraphicsApiArguments::ForceClamped | arg @
|
|
GraphicsApiArguments::ForceD3d11 | arg @
|
|
GraphicsApiArguments::ForceD3d12 | arg @
|
|
GraphicsApiArguments::ForceDeviceIndex | arg @
|
|
GraphicsApiArguments::ForceGlCore | arg @
|
|
GraphicsApiArguments::ForceGlCoreXy | arg @
|
|
GraphicsApiArguments::ForceGlEs | arg @
|
|
GraphicsApiArguments::ForceGlEsXy | arg @
|
|
GraphicsApiArguments::ForceOpenGl | arg @
|
|
GraphicsApiArguments::ForceVulkan =>
|
|
{ args.push(UnityArgument::GraphicsApi(arg)); }, arg @
|
|
LicenseArguments::CreateManualActivationFile | arg @
|
|
LicenseArguments::ManualLicenseFile(_) | arg @
|
|
LicenseArguments::ReturnLicense | arg @
|
|
LicenseArguments::Serial(_) =>
|
|
{ args.push(UnityArgument::License(arg)); }, arg @
|
|
MetalArguments::ForceLowPowerDevice | arg @
|
|
MetalArguments::ForceMetal | arg @
|
|
MetalArguments::EnableMetalCapture =>
|
|
{ args.push(UnityArgument::Metal(arg)); }, arg @
|
|
ProfilerArguments::DeepProfiling | arg @
|
|
ProfilerArguments::Enable | arg @
|
|
ProfilerArguments::LogFile(_) | arg @
|
|
ProfilerArguments::CaptureFrameCount(_) | arg @
|
|
ProfilerArguments::MaxUsedMemory(_) =>
|
|
{ args.push(UnityArgument::Profiler(arg)); }, arg @
|
|
EditorSpecialArguments::EnableIncompatibleAssetDowngrade |
|
|
arg @ EditorSpecialArguments::GiCustomCacheLocation(_) =>
|
|
{ args.push(UnityArgument::Editor(arg)); }, arg @
|
|
UnityArgument::Configuration(_) | arg @
|
|
UnityArgument::BatchMode(_) | arg @ UnityArgument::Build(_)
|
|
| arg @ UnityArgument::CacheServer(_) | arg @
|
|
UnityArgument::Debug(_) | arg @
|
|
UnityArgument::GraphicsApi(_) | arg @
|
|
UnityArgument::License(_) | arg @ UnityArgument::Metal(_) |
|
|
arg @ UnityArgument::Profiler(_) | arg @
|
|
UnityArgument::Editor(_) | arg @ UnityArgument::Extra(_) =>
|
|
{ args.push(arg); }, s: OsString =>
|
|
{ args.push(UnityArgument::Extra(s)); }, _ =>
|
|
compile_error!("Unsupported argument type in unity_args! macro. Ensure it's a valid argument enum variant or a String."),
|
|
})* UnityArguments(args)
|
|
}
|
|
};
|
|
}
|
|
pub struct EditorCommand {}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for EditorCommand {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::write_str(f, "EditorCommand")
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl _serde::Serialize for EditorCommand {
|
|
fn serialize<__S>(&self, __serializer: __S)
|
|
-> _serde::__private::Result<__S::Ok, __S::Error> where
|
|
__S: _serde::Serializer {
|
|
let __serde_state =
|
|
_serde::Serializer::serialize_struct(__serializer,
|
|
"EditorCommand", false as usize)?;
|
|
_serde::ser::SerializeStruct::end(__serde_state)
|
|
}
|
|
}
|
|
};
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for EditorCommand {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<EditorCommand>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = EditorCommand;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct EditorCommand")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, _: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
_serde::__private::Ok(EditorCommand {})
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
_serde::__private::Ok(EditorCommand {})
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] = &[];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"EditorCommand", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<EditorCommand>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
}
|
|
pub mod error {
|
|
use std::{error::Error as StdError, fmt::Display, path::PathBuf};
|
|
use toml::de::Error as TomlError;
|
|
pub struct ShellExpansionError {
|
|
variable: String,
|
|
context: Option<String>,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for ShellExpansionError {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field2_finish(f,
|
|
"ShellExpansionError", "variable", &self.variable, "context",
|
|
&&self.context)
|
|
}
|
|
}
|
|
impl ShellExpansionError {
|
|
pub fn new(variable: &str, context: Option<&str>) -> Self {
|
|
Self {
|
|
variable: variable.into(),
|
|
context: context.map(Into::into),
|
|
}
|
|
}
|
|
}
|
|
impl Display for ShellExpansionError {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
if let Some(context) = &self.context {
|
|
f.write_fmt(format_args!("Error expanding {0} in {1}",
|
|
self.variable, context))
|
|
} else {
|
|
f.write_fmt(format_args!("Error expanding {0}",
|
|
self.variable))
|
|
}
|
|
}
|
|
}
|
|
pub struct FileError {
|
|
path: PathBuf,
|
|
source: Box<dyn StdError>,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for FileError {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field2_finish(f, "FileError",
|
|
"path", &self.path, "source", &&self.source)
|
|
}
|
|
}
|
|
impl FileError {
|
|
pub fn new(path: impl Into<PathBuf>,
|
|
source: impl Into<Box<dyn StdError>>) -> Self {
|
|
Self { path: path.into(), source: source.into() }
|
|
}
|
|
}
|
|
impl Display for FileError {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
f.write_fmt(format_args!("Error handling \"{0}\": {1}",
|
|
self.path.display(), &self.source))
|
|
}
|
|
}
|
|
impl std::error::Error for FileError {}
|
|
pub enum ProjectManifestError { Read(FileError), Parse(TomlError), }
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for ProjectManifestError {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
ProjectManifestError::Read(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Read",
|
|
&__self_0),
|
|
ProjectManifestError::Parse(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"Parse", &__self_0),
|
|
}
|
|
}
|
|
}
|
|
impl From<FileError> for ProjectManifestError {
|
|
fn from(value: FileError) -> Self { Self::Read(value) }
|
|
}
|
|
impl From<TomlError> for ProjectManifestError {
|
|
fn from(value: TomlError) -> Self { Self::Parse(value) }
|
|
}
|
|
impl std::fmt::Display for ProjectManifestError {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
Self::Read(error) =>
|
|
f.write_fmt(format_args!("Error reading project manifest: {0}",
|
|
error)),
|
|
Self::Parse(error) =>
|
|
f.write_fmt(format_args!("Error parsing project manifest: {0}",
|
|
error)),
|
|
}
|
|
}
|
|
}
|
|
impl std::error::Error for ProjectManifestError {}
|
|
pub enum Error {
|
|
LoadConfig(confique::Error),
|
|
ProjectManifest(ProjectManifestError),
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for Error {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
match self {
|
|
Error::LoadConfig(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"LoadConfig", &__self_0),
|
|
Error::ProjectManifest(__self_0) =>
|
|
::core::fmt::Formatter::debug_tuple_field1_finish(f,
|
|
"ProjectManifest", &__self_0),
|
|
}
|
|
}
|
|
}
|
|
impl From<confique::Error> for Error {
|
|
fn from(value: confique::Error) -> Self { Self::LoadConfig(value) }
|
|
}
|
|
impl From<ProjectManifestError> for Error {
|
|
fn from(value: ProjectManifestError) -> Self {
|
|
Self::ProjectManifest(value)
|
|
}
|
|
}
|
|
impl std::fmt::Display for Error {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
Error::LoadConfig(error) =>
|
|
f.write_fmt(format_args!("Couldn\'t load config: {0}",
|
|
error)),
|
|
Error::ProjectManifest(error) =>
|
|
f.write_fmt(format_args!("Couldn\'t read projects: {0}",
|
|
error)),
|
|
}
|
|
}
|
|
}
|
|
impl std::error::Error for Error {}
|
|
}
|
|
pub mod project {
|
|
use std::path::PathBuf;
|
|
use serde::{Deserialize, Serialize};
|
|
pub struct Project {
|
|
pub name: String,
|
|
pub editor: String,
|
|
pub path: PathBuf,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for Project {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field3_finish(f, "Project",
|
|
"name", &self.name, "editor", &self.editor, "path",
|
|
&&self.path)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl _serde::Serialize for Project {
|
|
fn serialize<__S>(&self, __serializer: __S)
|
|
-> _serde::__private::Result<__S::Ok, __S::Error> where
|
|
__S: _serde::Serializer {
|
|
let mut __serde_state =
|
|
_serde::Serializer::serialize_struct(__serializer,
|
|
"Project", false as usize + 1 + 1 + 1)?;
|
|
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
|
|
"name", &self.name)?;
|
|
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
|
|
"editor", &self.editor)?;
|
|
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
|
|
"path", &self.path)?;
|
|
_serde::ser::SerializeStruct::end(__serde_state)
|
|
}
|
|
}
|
|
};
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for Project {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __field0, __field1, __field2, __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
0u64 => _serde::__private::Ok(__Field::__field0),
|
|
1u64 => _serde::__private::Ok(__Field::__field1),
|
|
2u64 => _serde::__private::Ok(__Field::__field2),
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
"name" => _serde::__private::Ok(__Field::__field0),
|
|
"editor" => _serde::__private::Ok(__Field::__field1),
|
|
"path" => _serde::__private::Ok(__Field::__field2),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
b"name" => _serde::__private::Ok(__Field::__field0),
|
|
b"editor" => _serde::__private::Ok(__Field::__field1),
|
|
b"path" => _serde::__private::Ok(__Field::__field2),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<Project>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = Project;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct Project")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, mut __seq: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
let __field0 =
|
|
match _serde::de::SeqAccess::next_element::<String>(&mut __seq)?
|
|
{
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
return _serde::__private::Err(_serde::de::Error::invalid_length(0usize,
|
|
&"struct Project with 3 elements")),
|
|
};
|
|
let __field1 =
|
|
match _serde::de::SeqAccess::next_element::<String>(&mut __seq)?
|
|
{
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
return _serde::__private::Err(_serde::de::Error::invalid_length(1usize,
|
|
&"struct Project with 3 elements")),
|
|
};
|
|
let __field2 =
|
|
match _serde::de::SeqAccess::next_element::<PathBuf>(&mut __seq)?
|
|
{
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
return _serde::__private::Err(_serde::de::Error::invalid_length(2usize,
|
|
&"struct Project with 3 elements")),
|
|
};
|
|
_serde::__private::Ok(Project {
|
|
name: __field0,
|
|
editor: __field1,
|
|
path: __field2,
|
|
})
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
let mut __field0: _serde::__private::Option<String> =
|
|
_serde::__private::None;
|
|
let mut __field1: _serde::__private::Option<String> =
|
|
_serde::__private::None;
|
|
let mut __field2: _serde::__private::Option<PathBuf> =
|
|
_serde::__private::None;
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
__Field::__field0 => {
|
|
if _serde::__private::Option::is_some(&__field0) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("name"));
|
|
}
|
|
__field0 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<String>(&mut __map)?);
|
|
}
|
|
__Field::__field1 => {
|
|
if _serde::__private::Option::is_some(&__field1) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("editor"));
|
|
}
|
|
__field1 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<String>(&mut __map)?);
|
|
}
|
|
__Field::__field2 => {
|
|
if _serde::__private::Option::is_some(&__field2) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("path"));
|
|
}
|
|
__field2 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<PathBuf>(&mut __map)?);
|
|
}
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
let __field0 =
|
|
match __field0 {
|
|
_serde::__private::Some(__field0) => __field0,
|
|
_serde::__private::None =>
|
|
_serde::__private::de::missing_field("name")?,
|
|
};
|
|
let __field1 =
|
|
match __field1 {
|
|
_serde::__private::Some(__field1) => __field1,
|
|
_serde::__private::None =>
|
|
_serde::__private::de::missing_field("editor")?,
|
|
};
|
|
let __field2 =
|
|
match __field2 {
|
|
_serde::__private::Some(__field2) => __field2,
|
|
_serde::__private::None =>
|
|
_serde::__private::de::missing_field("path")?,
|
|
};
|
|
_serde::__private::Ok(Project {
|
|
name: __field0,
|
|
editor: __field1,
|
|
path: __field2,
|
|
})
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] =
|
|
&["name", "editor", "path"];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"Project", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<Project>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
}
|
|
use std::{fs, ops::Deref, path::Path};
|
|
use serde::{Deserialize, Serialize};
|
|
use crate::{
|
|
config::Cfg, editor::Editor,
|
|
error::{Error, FileError, ProjectManifestError},
|
|
project::Project,
|
|
};
|
|
pub struct Projects {
|
|
projects: Vec<Project>,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for Projects {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field1_finish(f, "Projects",
|
|
"projects", &&self.projects)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl _serde::Serialize for Projects {
|
|
fn serialize<__S>(&self, __serializer: __S)
|
|
-> _serde::__private::Result<__S::Ok, __S::Error> where
|
|
__S: _serde::Serializer {
|
|
let mut __serde_state =
|
|
_serde::Serializer::serialize_struct(__serializer,
|
|
"Projects", false as usize + 1)?;
|
|
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
|
|
"projects", &self.projects)?;
|
|
_serde::ser::SerializeStruct::end(__serde_state)
|
|
}
|
|
}
|
|
};
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
|
|
clippy :: absolute_paths,)]
|
|
const _: () =
|
|
{
|
|
#[allow(unused_extern_crates, clippy :: useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for Projects {
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
#[allow(non_camel_case_types)]
|
|
#[doc(hidden)]
|
|
enum __Field { __field0, __ignore, }
|
|
#[doc(hidden)]
|
|
struct __FieldVisitor;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
|
|
type Value = __Field;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"field identifier")
|
|
}
|
|
fn visit_u64<__E>(self, __value: u64)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
0u64 => _serde::__private::Ok(__Field::__field0),
|
|
_ => _serde::__private::Ok(__Field::__ignore),
|
|
}
|
|
}
|
|
fn visit_str<__E>(self, __value: &str)
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
"projects" => _serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
fn visit_bytes<__E>(self, __value: &[u8])
|
|
-> _serde::__private::Result<Self::Value, __E> where
|
|
__E: _serde::de::Error {
|
|
match __value {
|
|
b"projects" => _serde::__private::Ok(__Field::__field0),
|
|
_ => { _serde::__private::Ok(__Field::__ignore) }
|
|
}
|
|
}
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for __Field {
|
|
#[inline]
|
|
fn deserialize<__D>(__deserializer: __D)
|
|
-> _serde::__private::Result<Self, __D::Error> where
|
|
__D: _serde::Deserializer<'de> {
|
|
_serde::Deserializer::deserialize_identifier(__deserializer,
|
|
__FieldVisitor)
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
struct __Visitor<'de> {
|
|
marker: _serde::__private::PhantomData<Projects>,
|
|
lifetime: _serde::__private::PhantomData<&'de ()>,
|
|
}
|
|
#[automatically_derived]
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> {
|
|
type Value = Projects;
|
|
fn expecting(&self,
|
|
__formatter: &mut _serde::__private::Formatter)
|
|
-> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter,
|
|
"struct Projects")
|
|
}
|
|
#[inline]
|
|
fn visit_seq<__A>(self, mut __seq: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::SeqAccess<'de> {
|
|
let __field0 =
|
|
match _serde::de::SeqAccess::next_element::<Vec<Project>>(&mut __seq)?
|
|
{
|
|
_serde::__private::Some(__value) => __value,
|
|
_serde::__private::None =>
|
|
return _serde::__private::Err(_serde::de::Error::invalid_length(0usize,
|
|
&"struct Projects with 1 element")),
|
|
};
|
|
_serde::__private::Ok(Projects { projects: __field0 })
|
|
}
|
|
#[inline]
|
|
fn visit_map<__A>(self, mut __map: __A)
|
|
-> _serde::__private::Result<Self::Value, __A::Error> where
|
|
__A: _serde::de::MapAccess<'de> {
|
|
let mut __field0: _serde::__private::Option<Vec<Project>> =
|
|
_serde::__private::None;
|
|
while let _serde::__private::Some(__key) =
|
|
_serde::de::MapAccess::next_key::<__Field>(&mut __map)? {
|
|
match __key {
|
|
__Field::__field0 => {
|
|
if _serde::__private::Option::is_some(&__field0) {
|
|
return _serde::__private::Err(<__A::Error as
|
|
_serde::de::Error>::duplicate_field("projects"));
|
|
}
|
|
__field0 =
|
|
_serde::__private::Some(_serde::de::MapAccess::next_value::<Vec<Project>>(&mut __map)?);
|
|
}
|
|
_ => {
|
|
let _ =
|
|
_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)?;
|
|
}
|
|
}
|
|
}
|
|
let __field0 =
|
|
match __field0 {
|
|
_serde::__private::Some(__field0) => __field0,
|
|
_serde::__private::None =>
|
|
_serde::__private::de::missing_field("projects")?,
|
|
};
|
|
_serde::__private::Ok(Projects { projects: __field0 })
|
|
}
|
|
}
|
|
#[doc(hidden)]
|
|
const FIELDS: &'static [&'static str] = &["projects"];
|
|
_serde::Deserializer::deserialize_struct(__deserializer,
|
|
"Projects", FIELDS,
|
|
__Visitor {
|
|
marker: _serde::__private::PhantomData::<Projects>,
|
|
lifetime: _serde::__private::PhantomData,
|
|
})
|
|
}
|
|
}
|
|
};
|
|
impl Projects {
|
|
pub fn new(projects: Vec<Project>) -> Self { Self { projects } }
|
|
}
|
|
impl From<Vec<Project>> for Projects {
|
|
fn from(value: Vec<Project>) -> Self { Self::new(value) }
|
|
}
|
|
impl Default for Projects {
|
|
fn default() -> Self { Self::new(Vec::new()) }
|
|
}
|
|
impl Deref for Projects {
|
|
type Target = Vec<Project>;
|
|
fn deref(&self) -> &Self::Target { &self.projects }
|
|
}
|
|
pub struct TormentNexus {
|
|
config: Cfg,
|
|
projects: Projects,
|
|
}
|
|
#[automatically_derived]
|
|
impl ::core::fmt::Debug for TormentNexus {
|
|
#[inline]
|
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
|
::core::fmt::Formatter::debug_struct_field2_finish(f, "TormentNexus",
|
|
"config", &self.config, "projects", &&self.projects)
|
|
}
|
|
}
|
|
impl TormentNexus {
|
|
pub fn new(config: Cfg, projects: impl Into<Projects>) -> Self {
|
|
Self { config, projects: projects.into() }
|
|
}
|
|
pub fn load() -> Result<Self, Error> {
|
|
let config = Cfg::from_env()?;
|
|
let projects = Self::read_projects(&config.project.manifest_path)?;
|
|
Ok(Self::new(config, projects))
|
|
}
|
|
pub fn read_projects(manifest_path: impl AsRef<Path>)
|
|
-> Result<Projects, ProjectManifestError> {
|
|
let content =
|
|
fs::read_to_string(&manifest_path).map_err(|err|
|
|
FileError::new(manifest_path.as_ref(), err))?;
|
|
Ok(toml::from_str::<Projects>(&content)?)
|
|
}
|
|
pub fn installed_editors(&self) -> Vec<Editor> { Vec::new() }
|
|
pub fn projects(&self) -> &Projects { &self.projects }
|
|
}
|