pub struct ProjectTemplates;Expand description
Provides template generators for all project files Each method returns the content of a specific file as a String
Implementations§
Source§impl ProjectTemplates
impl ProjectTemplates
Sourcepub fn project_swift_content() -> String
pub fn project_swift_content() -> String
Returns the default Swift source file template
Used to generate the main {name}.swift file inside Sources
Sourcepub fn test_content(project_name: &str) -> String
pub fn test_content(project_name: &str) -> String
Returns the default XCTest file template
Includes boilerplate test structure for {project_name}Tests.swift
Sourcepub fn package_swift_content(
project_name: &str,
platform: &str,
version: &str,
is_plugin: bool,
) -> String
pub fn package_swift_content( project_name: &str, platform: &str, version: &str, is_plugin: bool, ) -> String
Returns the Package.swift template Supports two variants: plugin-enabled or standard package
project_name- name of the Swift packageplatform- selected platform such as iOS or macOSversion- minimum deployment versionis_plugin- adds SwiftLint plugin configuration when true
Sourcepub fn changelog_content() -> String
pub fn changelog_content() -> String
Returns the default CHANGELOG.md template Used when the Changelog option is selected
Sourcepub fn readme_content(project_name: &str) -> String
pub fn readme_content(project_name: &str) -> String
Returns the README.md template Includes only the project title by default
Sourcepub fn spi_content(project_name: &str) -> String
pub fn spi_content(project_name: &str) -> String
Returns the .spi.yml template for Swift Package Index configuration Defines documentation targets and scheme attributes
Sourcepub fn swiftlint_content() -> String
pub fn swiftlint_content() -> String
Returns a default SwiftLint configuration template Includes baseline rules, opt-in rules, and excluded directories
Auto Trait Implementations§
impl Freeze for ProjectTemplates
impl RefUnwindSafe for ProjectTemplates
impl Send for ProjectTemplates
impl Sync for ProjectTemplates
impl Unpin for ProjectTemplates
impl UnwindSafe for ProjectTemplates
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.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>
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>
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