pub struct FormBatch {
pub payer_tins: TinBuffer,
pub recipient_tins: TinBuffer,
pub interest_income: AmountBuffer,
pub tax_years: Vec<u16>,
/* private fields */
}Expand description
Batch of tax forms for validation.
Uses Structure of Arrays (SoA) layout for cache efficiency.
Fields§
§payer_tins: TinBufferPayer TINs
recipient_tins: TinBufferRecipient TINs
interest_income: AmountBufferInterest income amounts (cents)
tax_years: Vec<u16>Tax year (stored as u16)
Implementations§
Source§impl FormBatch
impl FormBatch
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new batch with given capacity.
Sourcepub fn with_config(capacity: usize, config: ValidationConfig) -> Self
pub fn with_config(capacity: usize, config: ValidationConfig) -> Self
Create a batch with custom configuration.
Sourcepub fn push_income(&mut self, cents: i64)
pub fn push_income(&mut self, cents: i64)
Push an interest income amount.
Sourcepub fn push_tax_year(&mut self, year: u16)
pub fn push_tax_year(&mut self, year: u16)
Push a tax year.
Sourcepub fn validate(&self) -> BatchResult
pub fn validate(&self) -> BatchResult
Validate all forms in the batch.
Returns a BatchResult with validation flags for each form.
Sourcepub fn validate_tins_only(&self) -> BatchResult
pub fn validate_tins_only(&self) -> BatchResult
Validate TINs only (faster if you only need TIN validation).
Auto Trait Implementations§
impl Freeze for FormBatch
impl RefUnwindSafe for FormBatch
impl Send for FormBatch
impl Sync for FormBatch
impl Unpin for FormBatch
impl UnsafeUnpin for FormBatch
impl UnwindSafe for FormBatch
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
Mutably borrows from an owned value. Read more