fedimint_core::module

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