pub struct InitRequest {
pub project_name: String,
pub language: TargetLanguage,
pub project_dir: PathBuf,
pub schema_path: Option<PathBuf>,
}Expand description
Request to initialize a new Spikard project.
§Fields
project_name: The name of the project (used for packages, modules, etc.)language: Target implementation languageproject_dir: Root directory where the project will be createdschema_path: Optional path to an existing API schema to include in setup
§Example
ⓘ
use spikard_cli::init::InitRequest;
use spikard_cli::codegen::TargetLanguage;
use std::path::PathBuf;
let request = InitRequest {
project_name: "my_api".to_string(),
language: TargetLanguage::Python,
project_dir: PathBuf::from("."),
schema_path: Some(PathBuf::from("openapi.json")),
};Fields§
§project_name: StringThe name of the project to be created
language: TargetLanguageTarget programming language for the project
project_dir: PathBufDirectory where the project will be initialized
schema_path: Option<PathBuf>Optional path to an existing schema to include in setup
Trait Implementations§
Source§impl Clone for InitRequest
impl Clone for InitRequest
Source§fn clone(&self) -> InitRequest
fn clone(&self) -> InitRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InitRequest
impl RefUnwindSafe for InitRequest
impl Send for InitRequest
impl Sync for InitRequest
impl Unpin for InitRequest
impl UnsafeUnpin for InitRequest
impl UnwindSafe for InitRequest
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