Use An Object As A Value In MiniJinja
This example is longer than it needs to be, but it's what I needed for Neopoligen.
```cargo
=
```
use Object;
use Enumerator;
use ;
use Arc;
use BTreeMap;
minijinja
Output:
error[E0223]: ambiguous associated type
--> /Users/alan/.cargo/target/55/19854259915251/_active_nvim_run:18:10
|
18 | pages: Value::from_dyn_object<Page>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `from_dyn_object` implemented for `Value`, you could use the fully-qualified path
|
18 | pages: <Value as Example>::from_dyn_object
| ~~~~~~~~~~~~~
error[E0277]: the trait bound `DynObject: From<Vec<_>>` is not satisfied
--> /Users/alan/.cargo/target/55/19854259915251/_active_nvim_run:74:35
|
74 | pages: Value::from_dyn_object(vec![])
| ---------------------- ^^^^^^ the trait `From<Vec<_>>` is not implemented for `DynObject`, which is required by `Vec<_>: Into<DynObject>`
| |
| required by a bound introduced by this call
|
= help: the trait `From<Arc<_>>` is implemented for `DynObject`
= help: for that trait implementation, expected `Arc<_>`, found `Vec<_>`
= note: required for `Vec<_>` to implement `Into<DynObject>`
note: required by a bound in `Value::from_dyn_object`
--> /Users/alan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/minijinja-2.3.1/src/value/mod.rs:814:31
|
814 | pub fn from_dyn_object<T: Into<DynObject>>(value: T) -> Value {
| ^^^^^^^^^^^^^^^ required by this bound in `Value::from_dyn_object`
Some errors have detailed explanations: E0223, E0277.
For more information about an error, try `rustc --explain E0223`.
error: could not compile `_active_nvim_run` (bin "_active_nvim_run") due to 2 previous errors
-- end of line --