pub struct ContractRequest {
pub method: ContractMethod,
pub path: String,
pub query: Option<HashMap<String, String>>,
pub headers: Option<HashMap<String, String>>,
pub body: Option<Value>,
}Expand description
Contract request
Fields§
§method: ContractMethodHTTP method
path: StringRequest path
query: Option<HashMap<String, String>>Query parameters
headers: Option<HashMap<String, String>>Request headers
body: Option<Value>Request body
Implementations§
Source§impl ContractRequest
impl ContractRequest
Sourcepub fn new(method: ContractMethod, path: impl Into<String>) -> Self
pub fn new(method: ContractMethod, path: impl Into<String>) -> Self
Create new contract request
Sourcepub fn with_query(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_query( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add query parameter
Trait Implementations§
Source§impl Clone for ContractRequest
impl Clone for ContractRequest
Source§impl Debug for ContractRequest
impl Debug for ContractRequest
Source§impl<'de> Deserialize<'de> for ContractRequest
impl<'de> Deserialize<'de> for ContractRequest
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
Auto Trait Implementations§
impl Freeze for ContractRequest
impl RefUnwindSafe for ContractRequest
impl Send for ContractRequest
impl Sync for ContractRequest
impl Unpin for ContractRequest
impl UnsafeUnpin for ContractRequest
impl UnwindSafe for ContractRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<R, D> DepsPresent<D> for R
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging