| Crates.io | line_cutter-macros |
| lib.rs | line_cutter-macros |
| version | 1.0.1 |
| created_at | 2025-10-17 16:03:21.203546+00 |
| updated_at | 2025-10-17 20:45:49.027134+00 |
| description | line_cutter's proc-macros |
| homepage | https://gitlab.com/brunorobert/line_cutter |
| repository | https://gitlab.com/brunorobert/line_cutter_macros |
| max_upload_size | |
| id | 1887854 |
| size | 44,818 |
Procedural macro for deriving the PositionalEncoded trait from the line_cutter crate.
This crate provides the #[derive(PositionalText)] procedural macro. You should not add this crate as a direct dependency.
Instead, use the main line_cutter crate, which re-exports this derive macro:
[dependencies]
line_cutter = "1.0"
The PositionalText derive macro automatically implements the PositionalEncoded trait for structs with fixed-width positional text fields. It generates:
decode() - Parse fixed-width strings into structured dataencode() - Convert structured data back to fixed-width stringsvalidate() - Validate field values before encodinguse line_cutter::PositionalText;
#[derive(PositionalText)]
pub struct MyRecord {
#[positional_field(start = 1, size = 10)]
name: String,
#[positional_field(start = 11, size = 8)]
date: chrono::NaiveDate,
}
For complete documentation, usage examples, and supported types, see the main line_cutter crate.
Licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.