to_string

Function to_string 

Source
pub fn to_string<T>(value: &T) -> Result<String>
where T: Serialize,
Expand description

Serialize the given data structure as a String of VDF

§Errors

If T uses an unsupported Serde data type, or T’s Serialize implementation itself returns an error, an error will be returned.

Notably, if T has a map with a non-atomic key, an error will not be returned. In these cases, this behavior is likely incompatible with other VDF parsers.