asimov_patterns/execute/
fetcher.rs

1// This is free and unencumbered software released into the public domain.
2
3use crate::Execute;
4use dogma::prelude::String;
5use typed_builder::TypedBuilder;
6
7/// Network protocol fetcher. Consumes a URL input, produces some output.
8pub trait Fetcher<T, E>: Execute<T, E> {}
9
10/// Configuration options for [`Fetcher`].
11///
12/// # Examples
13///
14/// ```rust
15/// use asimov_patterns::FetcherOptions;
16///
17/// let options = FetcherOptions::builder()
18///     .input_url("https://crates.io/robots.txt".to_string())
19///     .build();
20/// ```
21#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd, TypedBuilder)]
22pub struct FetcherOptions {
23    pub input_url: String,
24}