{"id":25427927,"url":"https://github.com/kulapoo/parameterx","last_synced_at":"2026-02-18T17:31:32.939Z","repository":{"id":277386018,"uuid":"932244268","full_name":"kulapoo/parameterx","owner":"kulapoo","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-13T16:43:06.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-04T00:20:11.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kulapoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-13T15:52:19.000Z","updated_at":"2025-02-13T16:43:09.000Z","dependencies_parsed_at":"2025-02-13T17:43:42.883Z","dependency_job_id":"e4dfa72c-402f-4c95-b417-e03707062df0","html_url":"https://github.com/kulapoo/parameterx","commit_stats":null,"previous_names":["kulapoo/parameterx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kulapoo/parameterx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Fparameterx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Fparameterx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Fparameterx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Fparameterx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kulapoo","download_url":"https://codeload.github.com/kulapoo/parameterx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Fparameterx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29587081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-17T01:31:02.168Z","updated_at":"2026-02-18T17:31:32.910Z","avatar_url":"https://github.com/kulapoo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Parameters Library\n\nA flexible and type-safe parameter management system for Rust applications. This library provides multiple ways to store and retrieve typed values using a key-value structure, with support for custom types and various initialization patterns.\n\n## Features\n\n- Type-safe parameter storage and retrieval\n- Multiple initialization patterns (direct, builder, macro)\n- Support for custom types\n- Vector type support through `IntVec`\n- String conversion capabilities\n- Zero-cost abstractions with Rust's type system\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nparameters = \"0.1.0\"  # Replace with actual version\n```\n\n## Usage\n\n### Basic Usage\n\nThe simplest way to use the Parameters system is through direct insertion and retrieval:\n\n```rust\nlet mut params = Parameters::new();\nparams.insert(\"name\", \"Alice\");\nparams.insert(\"age\", 30);\nparams.insert(\"height\", 5.9f64);\n\n// Type-safe retrieval\nlet name: Option\u003c\u0026str\u003e = params.get(\"name\");\nlet age: Option\u003ci32\u003e = params.get(\"age\");\n```\n\n### Builder Pattern\n\nFor more complex initialization scenarios, use the builder pattern:\n\n```rust\nlet params = ParametersBuilder::new()\n    .add(\"name\", \"Bob\")\n    .add(\"scores\", IntVec::\u003ci32\u003e(vec![85, 92, 78]))\n    .build();\n```\n\n### Macro Usage\n\nThe library provides a convenient macro for quick parameter creation:\n\n```rust\nlet params = parameters! {\n    \"name\" =\u003e \"Charlie\",\n    \"age\" =\u003e \"25\",\n};\n```\n\n### Custom Types\n\nThe system supports custom types that implement the necessary traits:\n\n```rust\n#[derive(Debug, Clone)]\nstruct Person {\n    name: String,\n    age: i32,\n}\n\nimpl ToString for Person {\n    fn to_string(\u0026self) -\u003e String {\n        format!(\"{} ({})\", self.name, self.age)\n    }\n}\n\nlet person = Person {\n    name: \"Dave\".to_string(),\n    age: 35,\n};\n\nlet params = Parameters::new().with(\"person\", person);\n```\n\n## API Reference\n\n### Parameters\n\n- `new()`: Creates a new empty Parameters instance\n- `insert\u003cT\u003e(key: \u0026str, value: T)`: Inserts a value with the given key\n- `get\u003cT\u003e(key: \u0026str) -\u003e Option\u003c\u0026T\u003e`: Retrieves a value by key with type checking\n- `get_string(key: \u0026str) -\u003e Option\u003cString\u003e`: Retrieves a value as a String\n\n### ParametersBuilder\n\n- `new()`: Creates a new builder instance\n- `add\u003cT\u003e(key: \u0026str, value: T)`: Adds a parameter to the builder\n- `build()`: Constructs the final Parameters instance\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkulapoo%2Fparameterx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkulapoo%2Fparameterx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkulapoo%2Fparameterx/lists"}