pub struct RestStreamConfig {Show 14 fields
pub base_url: String,
pub path: String,
pub method: Method,
pub auth: Auth,
pub headers: HeaderMap,
pub query_params: HashMap<String, String>,
pub body: Option<Value>,
pub pagination: PaginationStyle,
pub records_path: Option<String>,
pub max_pages: Option<usize>,
pub request_delay: Option<Duration>,
pub timeout: Option<Duration>,
pub max_retries: u32,
pub retry_backoff: Duration,
}Expand description
Configuration for a RestStream.
Fields§
§base_url: String§path: String§method: Method§auth: Auth§headers: HeaderMap§query_params: HashMap<String, String>§body: Option<Value>§pagination: PaginationStyle§records_path: Option<String>§max_pages: Option<usize>§request_delay: Option<Duration>§timeout: Option<Duration>§max_retries: u32§retry_backoff: DurationImplementations§
Source§impl RestStreamConfig
impl RestStreamConfig
pub fn new(base_url: &str, path: &str) -> Self
pub fn method(self, m: Method) -> Self
pub fn auth(self, a: Auth) -> Self
pub fn header(self, k: &str, v: &str) -> Self
pub fn query(self, k: &str, v: &str) -> Self
pub fn body(self, b: Value) -> Self
pub fn pagination(self, p: PaginationStyle) -> Self
pub fn records_path(self, p: &str) -> Self
pub fn max_pages(self, n: usize) -> Self
pub fn request_delay(self, d: Duration) -> Self
pub fn timeout(self, d: Duration) -> Self
pub fn max_retries(self, n: u32) -> Self
pub fn retry_backoff(self, d: Duration) -> Self
Trait Implementations§
Source§impl Clone for RestStreamConfig
impl Clone for RestStreamConfig
Source§fn clone(&self) -> RestStreamConfig
fn clone(&self) -> RestStreamConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RestStreamConfig
impl Debug for RestStreamConfig
Auto Trait Implementations§
impl Freeze for RestStreamConfig
impl RefUnwindSafe for RestStreamConfig
impl Send for RestStreamConfig
impl Sync for RestStreamConfig
impl Unpin for RestStreamConfig
impl UnsafeUnpin for RestStreamConfig
impl UnwindSafe for RestStreamConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more