Expand description
Item traits and parse-time output helpers.
ParseOutput is the async sink carried by a spider’s parse context.
Spiders typically use it indirectly through ParseContext helpers such as
cx.add_item(...) and cx.add_request(...), while the runtime uses it to
stream scraped items and follow-up requests as they are discovered.
§Example
ⓘ
use spider_util::item::{ScrapedItem, ParseOutput};
#[spider_macro::scraped_item]
struct Article {
title: String,
content: String,
}
// In your spider's parse method:
// output.add_item(Article { title: "...", content: "..." }).await?;
// output.add_request(request).await?;ParseOutput intentionally hides the runtime transport details. The
crawler can backpressure parsing internally while spider code continues to
use familiar add_* methods.
Structs§
- Item
Field Schema - Static schema metadata for a single item field.
- Item
Schema - Static schema metadata for a scraped item type.
- Parse
Output - Async output sink passed into a spider’s
parsemethod.
Enums§
- Field
Value Type - Stable field kinds used by typed item schema metadata.
Traits§
- Scraped
Item - Trait implemented by item types emitted from spiders.
- Typed
Item Schema - Trait for typed item definitions that can expose static schema metadata.