feat(tvix/serde): implement enum deserialisation

Implements externally tagged enum deserialisation. Other serialisation
methods are handled by serde internally using the existing methods.

See the tests for examples.

Change-Id: Ic4a9da3b5a32ddbb5918b1512e70c3ac5ce64f04
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7721
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vincent Ambo 2023-01-02 13:39:42 +03:00 committed by tazjin
parent 0e88eb83ef
commit 34be6466d4
4 changed files with 189 additions and 7 deletions

View file

@ -47,7 +47,7 @@ pub use crate::io::{DummyIO, EvalIO, FileType};
use crate::observer::{CompilerObserver, RuntimeObserver};
pub use crate::pretty_ast::pretty_print_expr;
pub use crate::source::SourceCode;
pub use crate::value::Value;
pub use crate::value::{NixAttrs, NixList, NixString, Value};
pub use crate::vm::run_lambda;
pub use crate::warnings::{EvalWarning, WarningKind};