pub struct XmlStreamConfig {
pub base_url: String,
pub path: String,
pub method: Method,
pub auth: XmlAuth,
pub headers: HeaderMap,
pub body: Option<String>,
pub records_element_path: Option<String>,
pub pagination: Option<XmlPagination>,
pub max_pages: Option<usize>,
pub query_params: HashMap<String, String>,
}Expand description
Configuration for the XML source.
Fields§
§base_url: StringBase URL of the API.
path: StringRequest path (appended to base_url).
method: MethodHTTP method (GET or POST for SOAP).
auth: XmlAuthAuthentication method.
headers: HeaderMapAdditional request headers.
body: Option<String>Optional request body (e.g. SOAP envelope).
records_element_path: Option<String>Dot-separated path to the repeating element in the XML response
(e.g. "Envelope.Body.GetUsersResponse.Users.User").
pagination: Option<XmlPagination>Pagination configuration.
max_pages: Option<usize>Maximum number of pages to fetch.
query_params: HashMap<String, String>Query parameters to include in every request.
Implementations§
Source§impl XmlStreamConfig
impl XmlStreamConfig
Sourcepub fn new(base_url: impl Into<String>, path: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>, path: impl Into<String>) -> Self
Create a new config with required fields.
Sourcepub fn records_element_path(self, path: impl Into<String>) -> Self
pub fn records_element_path(self, path: impl Into<String>) -> Self
Set the dot-separated path to the repeating element.
Sourcepub fn pagination(self, pagination: XmlPagination) -> Self
pub fn pagination(self, pagination: XmlPagination) -> Self
Set pagination configuration.
Trait Implementations§
Source§impl Clone for XmlStreamConfig
impl Clone for XmlStreamConfig
Source§fn clone(&self) -> XmlStreamConfig
fn clone(&self) -> XmlStreamConfig
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 XmlStreamConfig
impl Debug for XmlStreamConfig
Source§impl<'de> Deserialize<'de> for XmlStreamConfig
impl<'de> Deserialize<'de> for XmlStreamConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for XmlStreamConfig
impl JsonSchema for XmlStreamConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for XmlStreamConfig
impl RefUnwindSafe for XmlStreamConfig
impl Send for XmlStreamConfig
impl Sync for XmlStreamConfig
impl Unpin for XmlStreamConfig
impl UnsafeUnpin for XmlStreamConfig
impl UnwindSafe for XmlStreamConfig
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