Skip to main content

ofx_rs/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(clippy::unwrap_used, clippy::expect_used)]
3
4//! `ofx-rs` -- A Rust library for parsing Open Financial Exchange (OFX) documents.
5//!
6//! This library provides a pure functional parser for OFX 1.x and 2.x documents.
7//! It takes string input and produces typed data structures with no I/O.
8//!
9//! # Usage
10//!
11//! ```
12//! use ofx_rs::parse;
13//!
14//! let ofx_content = r#"<?OFX OFXHEADER="200" VERSION="220" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
15//! <OFX>
16//! <SIGNONMSGSRSV1>
17//! <SONRS>
18//! <STATUS><CODE>0</CODE><SEVERITY>INFO</SEVERITY></STATUS>
19//! <DTSERVER>20230115120000</DTSERVER>
20//! <LANGUAGE>ENG</LANGUAGE>
21//! </SONRS>
22//! </SIGNONMSGSRSV1>
23//! </OFX>"#;
24//!
25//! let doc = parse(ofx_content).unwrap();
26//! assert!(doc.signon().status().is_success());
27//! ```
28
29pub mod aggregates;
30pub mod document;
31pub mod error;
32pub mod header;
33mod parser;
34mod sgml;
35pub mod types;
36pub mod xml;
37
38pub use document::OfxDocument;
39pub use error::OfxError;
40pub use parser::parse;