Trait forest_filecoin::lotus_json::HasLotusJson
source · pub trait HasLotusJson: Sized {
type LotusJson: Serialize + DeserializeOwned;
// Required methods
fn into_lotus_json(self) -> Self::LotusJson;
fn from_lotus_json(lotus_json: Self::LotusJson) -> Self;
// Provided methods
fn into_lotus_json_value(self) -> Result<Value> { ... }
fn into_lotus_json_string(self) -> Result<String> { ... }
fn into_lotus_json_string_pretty(self) -> Result<String> { ... }
}
Required Associated Types§
sourcetype LotusJson: Serialize + DeserializeOwned
type LotusJson: Serialize + DeserializeOwned
The struct representing JSON. You should #[derive(Deserialize, Serialize)]
on it.
Required Methods§
fn into_lotus_json(self) -> Self::LotusJson
fn from_lotus_json(lotus_json: Self::LotusJson) -> Self
Provided Methods§
fn into_lotus_json_value(self) -> Result<Value>
fn into_lotus_json_string(self) -> Result<String>
fn into_lotus_json_string_pretty(self) -> Result<String>
Object Safety§
This trait is not object safe.