pub struct ProjectTemplate {
pub name: ProjectTemplateName,
pub display: String,
pub resource_location: ResourceLocation,
pub category: ProjectTemplateCategory,
pub requirements: Vec<ProjectTemplateName>,
pub post_create: Vec<String>,
pub post_create_spinner_message: Option<String>,
pub post_create_failure_warning: Option<String>,
pub sort_order: u32,
}Fields§
§name: ProjectTemplateNameThe name of the template as specified on the command line,
for example --type rust
display: StringThe name used for display and sorting
resource_location: ResourceLocationHow to obtain the template’s files
category: ProjectTemplateCategoryUsed to determine which CLI group (--type, --backend, --frontend)
as well as for interactive selection
requirements: Vec<ProjectTemplateName>Other project templates to patch in alongside this one
post_create: Vec<String>Run a command after adding the canister to dfx.json
post_create_spinner_message: Option<String>If set, display a spinner while this command runs
post_create_failure_warning: Option<String>If the post-create command fails, display this warning but don’t fail
sort_order: u32The sort order is fixed rather than settable in properties: For backend:
- motoko=0
- rust=1
- everything else=2 (and then by display name)
For frontend:
- SvelteKit=0
- React=1
- Vue=2
- Vanilla JS=3
- No JS Template=4
- everything else=5 (and then by display name)
For extras:
- Internet Identity=0
- Bitcoin=1
- everything else=2 (and then by display name)
- Frontend Tests
Trait Implementations§
Source§impl Clone for ProjectTemplate
impl Clone for ProjectTemplate
Source§fn clone(&self) -> ProjectTemplate
fn clone(&self) -> ProjectTemplate
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 ProjectTemplate
impl RefUnwindSafe for ProjectTemplate
impl Send for ProjectTemplate
impl Sync for ProjectTemplate
impl Unpin for ProjectTemplate
impl UnsafeUnpin for ProjectTemplate
impl UnwindSafe for ProjectTemplate
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