cnab-derive 0.1.2

Macro derive interna para o crate cnab-fixed-width.
Documentation

Derive Macro para FixedWidth

Este crate fornece a macro procedural #[derive(FixedWidth)] que gera automaticamente a implementação da trait FixedWidthParse do crate cnab_fixedwidth.

Exemplo de Uso

use fixedwidth_derive::FixedWidth;

#[derive(FixedWidth)]
struct Header {
    #[fw(pos = "1..3", numeric)]
    banco: u32,

    #[fw(pos = "4..8", numeric)]
    lote: u32,

    #[fw(pos = "10..20", alpha)]
    texto: String,
}