Type Alias fedimint_core::module::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) -> ApiRequestErased

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