| Crates.io | reqsign-file-read-tokio |
| lib.rs | reqsign-file-read-tokio |
| version | 1.0.0 |
| created_at | 2025-09-01 09:54:26.146981+00 |
| updated_at | 2025-09-01 09:54:26.146981+00 |
| description | Signing API requests without effort. |
| homepage | |
| repository | https://github.com/Xuanwo/reqsign |
| max_upload_size | |
| id | 1819366 |
| size | 29,324 |
Tokio-based file reading implementation for reqsign.
This crate provides TokioFileRead, an async file reader that implements the FileRead trait from reqsign_core using Tokio's file system operations.
use reqsign_core::Context;
use reqsign_file_read_tokio::TokioFileRead;
// Create a context with Tokio file reader
let ctx = Context::new(
TokioFileRead::default(),
http_client, // Your HTTP client
);
// Read files asynchronously
let content = ctx.file_read("/path/to/file").await?;
This crate is essential when:
~/.aws/credentials)Check out the read_credentials example to see how to read credential files:
cargo run --example read_credentials -- ~/.aws/credentials
use reqsign_core::{Context, Signer};
use reqsign_file_read_tokio::TokioFileRead;
use reqsign_http_send_reqwest::ReqwestHttpSend;
// Create context with Tokio file reader
let ctx = Context::new(
TokioFileRead::default(),
ReqwestHttpSend::default(),
);
// Use with any service that needs file access
let signer = Signer::new(ctx, loader, builder);
fs feature enabledLicensed under Apache License, Version 2.0.