Skip to main content

from_value

Function from_value 

Source
pub fn from_value<T: DeserializeOwned + 'static>(
    input: JsValue,
) -> Result<T, Error>
Expand description

Decode an owned DTO.

Root Value is constructed without serde_json’s private map markers. Arbitrary nested Value fields must use deserialize_value or deserialize_optional_value; JsValue fields require no adapter.

§Errors

Returns an error if the value cannot be deserialized into the requested type.