Registry / database / tokio-pg-mapper

tokio-pg-mapper

JSON →
library0.2.0rscratesunverified

Proc-macro library used to map a tokio-postgres row to a Rust type (struct).

# Cargo.toml [dependencies] tokio-pg-mapper = "0.2.0"
INSTALL
IMPORT
SIG · TOKIO-PG-MAPPER
T
tokio-pg-mapper
databaserustv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FromTokioPostgresRow
use tokio_pg_mapper::FromTokioPostgresRow;

Derive a struct to map from a tokio-postgres Row.

use tokio_pg_mapper::FromTokioPostgresRow; use tokio_postgres::Row; #[derive(FromTokioPostgresRow)] struct User { id: i32, name: String, } async fn example(row: &Row) -> User { User::from_row(row).unwrap() }
Debug
Known issues
gotchaRequires tokio-postgres Row type; only works with tokio runtime.
fix
Ensure you have tokio-postgres and tokio runtime in dependencies.
affects: >=0.1.0
Upgrade
Version history
0.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
30
Resources