Stores
Stores persist scraped items. Set one with .store() on the engine builder. All stores implement the ItemStore trait.
File Stores (default, no feature flag)
JsonlStore
One JSON object per line — most efficient for large crawls:
JsonStore
Pretty-printed JSON array written atomically on crawl completion:
CsvStore
CSV with headers derived from the item's field names:
StdoutStore
Prints each item as JSON to stdout — useful for debugging:
PostgreSQL
Requires features = ["postgres"].
let store = PostgresStore::new(
"postgres://user:pass@localhost/mydb",
"items", // table name
).await?;
.store(store)
The store creates the table if it does not exist. Each item is inserted as a JSONB row.
SQLite
Requires features = ["sqlite"].
MySQL
Requires features = ["mysql"].
Custom Store
Implement ItemStore to write to any destination: