| Crates.io | xero-rs |
| lib.rs | xero-rs |
| version | 0.2.0-alpha.17 |
| created_at | 2021-07-26 09:49:50.885332+00 |
| updated_at | 2026-01-22 00:16:16.269377+00 |
| description | A Xero API client library for Rust |
| homepage | |
| repository | https://github.com/slickbench/xero-rs |
| max_upload_size | |
| id | 427361 |
| size | 3,464,044 |
A Xero API client library for Rust. This library is in very early days and the API is not stable, it may change without notice.
This was put together as part of the requirements for a private project so I will be implementing features as-needed, but all contributions are welcome.
XeroEndpoint enumxero-rs uses miette for rich error diagnostics. The Error type implements the Diagnostic trait, which means you get detailed error reports with context and help text.
// Example of handling errors with miette
use xero_rs::error::Result;
fn do_something() -> Result<()> {
// If this fails, you'll get a rich diagnostic error
let client = xero_rs::Client::from_client_credentials(...)?;
// No need to call .into_diagnostic() when using xero_rs::error::Result
Ok(())
}
When using with miette's own Result type, you'll need to use .into_diagnostic():
use miette::{Result, IntoDiagnostic};
fn do_something() -> Result<()> {
// Converting to miette's Result requires .into_diagnostic()
let client = xero_rs::Client::from_client_credentials(...).into_diagnostic()?;
Ok(())
}
This has been implemented so far:
XeroEndpoint