pub struct Project {
pub config: ProjectConfig,
pub dir: PathBuf,
}Fields§
§config: ProjectConfig§dir: PathBufImplementations§
Source§impl Project
impl Project
pub fn new(parent: PathBuf, name: &str) -> Self
pub fn exists(&self) -> bool
pub fn load_from_file(project_config_path: PathBuf) -> Result<Self>
pub fn get_dir(&self) -> PathBuf
pub fn get_resource_dir(&self) -> PathBuf
pub fn get_resource_dir_asset_path(&self, asset_name: &str) -> PathBuf
pub fn get_editor_preview_image_path(&self) -> PathBuf
pub fn get_editor_layer_path(&self) -> PathBuf
pub fn get_editor_params_path(&self) -> PathBuf
pub fn get_project_config_path(&self) -> PathBuf
pub fn get_cargo_path(&self) -> Result<PathBuf>
pub fn get_cargo_toml_name(&self) -> Result<String>
pub fn generate_to_disk( &self, lib_source: LibSource, init_git: bool, ) -> Result<()>
pub fn save_config(&self) -> Result<()>
pub fn get_plottery_target_dir(&self) -> Result<PathBuf>
pub fn get_plottery_binary_path(&self, release: bool) -> Result<PathBuf>
pub fn build(&self, release: bool) -> Result<()>
pub async fn build_async(&self, release: bool) -> Result<Child>
pub fn run( &self, release: bool, params: &ProjectParamsListWrapper, ) -> Result<Layer>
pub async fn run_async( &self, release: bool, params: &ProjectParamsListWrapper, ) -> Result<(Child, NamedTempFile)>
pub fn run_get_params(&self, release: bool) -> Result<ProjectParamsListWrapper>
pub async fn run_get_params_async(&self, release: bool) -> Result<Child>
pub fn write_svg( &self, path: PathBuf, release: bool, params: &ProjectParamsListWrapper, ) -> Result<()>
pub fn write_png( &self, path: PathBuf, release: bool, params: &ProjectParamsListWrapper, ) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Project
impl<'de> Deserialize<'de> for Project
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnwindSafe for Project
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more