Type Alias ApiRequestErased

Source
pub type ApiRequestErased = ApiRequest<JsonValue>;

Aliased Type§

struct ApiRequestErased {
    pub auth: Option<ApiAuth>,
    pub params: Value,
}

Fields§

§auth: Option<ApiAuth>

Hashed user password if the API requires authentication

§params: Value

Parameters required by the API

Implementations§

Source§

impl ApiRequestErased

Source

pub fn new<T: Serialize>(params: T) -> Self

Source

pub fn to_json(&self) -> JsonValue

Source

pub fn with_auth(self, auth: ApiAuth) -> Self

Source

pub fn to_typed<T: DeserializeOwned>(self) -> Result<ApiRequest<T>, Error>

Trait Implementations§

Source§

impl Default for ApiRequestErased

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T: Clone> Clone for ApiRequest<T>

Source§

fn clone(&self) -> ApiRequest<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for ApiRequest<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, T> Deserialize<'de> for ApiRequest<T>
where T: Deserialize<'de>,

Source§

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<T> Serialize for ApiRequest<T>
where T: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more