MCPcopy Create free account
hub / github.com/Wulf/create-rust-app / create_resource

Function create_resource

crates/create-rust-app_cli/src/content/project.rs:699–717  ·  view source on GitHub ↗
(
    backend: BackendFramework,
    resource_name: &str,
    include_qsync_attr: bool,
)

Source from the content-addressed store, hash-verified

697}
698
699pub fn create_resource(
700 backend: BackendFramework,
701 resource_name: &str,
702 include_qsync_attr: bool,
703) -> Result<()> {
704 let resource_name = resource_name.to_pascal_case();
705
706 logger::message(&format!("Creating resource '{resource_name}'"));
707
708 crate::content::service::create(
709 backend,
710 &resource_name,
711 &format!("services::{}::api()", &resource_name),
712 &resource_name.to_snake_case(),
713 include_qsync_attr,
714 )?;
715
716 Ok(())
717}
718
719pub fn check_cli_version() {
720 let name = env!("CARGO_PKG_NAME");

Callers 1

configure_projectFunction · 0.85

Calls 2

messageFunction · 0.85
createFunction · 0.70

Tested by

no test coverage detected