library: material: enum: add deserialization

This commit is contained in:
Bruno BELANYI 2020-03-18 15:42:18 +01:00
parent 05fb6601b2
commit 6aa5f2536c

View file

@ -1,10 +1,14 @@
use super::core::color::LinearColor;
use super::Point2D;
use serde::Deserialize;
/// All the existing `Material` implementation.
#[serde(tag = "type")]
#[serde(rename_all = "lowercase")]
#[enum_dispatch::enum_dispatch]
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Deserialize)]
pub enum MaterialEnum {
#[serde(rename = "uniform")]
UniformMaterial,
}