NestedValue new() method for easy wrapping
This commit is contained in:
parent
c70035b044
commit
6143ddc93d
|
@ -40,6 +40,10 @@ impl<D: Domain> Domain for Arc<D> {
|
|||
}
|
||||
|
||||
pub trait NestedValue<D: Embeddable>: Sized + Debug + Clone + Eq + Hash + Ord {
|
||||
fn new<V>(v: V) -> Self where Value<Self, D>: From<V> {
|
||||
Value::from(v).wrap()
|
||||
}
|
||||
|
||||
fn wrap(anns: Annotations<Self, D>, v: Value<Self, D>) -> Self;
|
||||
|
||||
fn annotations(&self) -> &Annotations<Self, D>;
|
||||
|
|
Loading…
Reference in New Issue