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