pub struct RequestParams { /* private fields */ }Expand description
A flexible request-parameter builder for low-frequency OKX endpoints.
This type is used by edge APIs whose parameters differ substantially across endpoint families. Prefer endpoint-specific request builders where the crate provides one.
Implementations§
Source§impl RequestParams
impl RequestParams
Sourcepub fn param(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn param(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a string parameter.
Sourcepub fn bool_param(self, key: impl Into<String>, value: bool) -> Self
pub fn bool_param(self, key: impl Into<String>, value: bool) -> Self
Add a boolean parameter.
Sourcepub fn string_list<I, S>(self, key: impl Into<String>, values: I) -> Self
pub fn string_list<I, S>(self, key: impl Into<String>, values: I) -> Self
Add an array-of-strings parameter.
Trait Implementations§
Source§impl Clone for RequestParams
impl Clone for RequestParams
Source§fn clone(&self) -> RequestParams
fn clone(&self) -> RequestParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RequestParams
impl Debug for RequestParams
Source§impl Default for RequestParams
impl Default for RequestParams
Source§fn default() -> RequestParams
fn default() -> RequestParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RequestParams
impl RefUnwindSafe for RequestParams
impl Send for RequestParams
impl Sync for RequestParams
impl Unpin for RequestParams
impl UnsafeUnpin for RequestParams
impl UnwindSafe for RequestParams
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