Trait IntoObjectRef

Source
pub trait IntoObjectRef: IntoValue {
    // Required method
    fn into_object_ref(self, obj: &mut Object<Value>);
}
Expand description

Implemented for all meta structures which can be serialized into an object.

Instead of creating a new Value as done with IntoValue::into_value, this trait assumes the underlying value is an object like (struct) and can be directly serialized into an object without creating an intermediate object first.

Only meta structures which implement IntoObjectRef can be flattened.

Required Methods§

Source

fn into_object_ref(self, obj: &mut Object<Value>)

Boxes the meta structure back into an object of values.

All fields contained need to be added to the passed obj. This is the inverse operation to FromObjectRef::from_object_ref.

Implementors§