pub struct MaterialReference {
pub values: Option<Option<MaterialValues>>,
pub value: Option<usize>,
pub other: HashMap<String, Value>,
}Expand description
One theme’s material assignment for a geometry: either a value colouring
the whole object, or a depth-typed values array with one index per
surface.
The schema requires exactly one of the two
(oneOf: [{required: ["value"]}, {required: ["values"]}]) but separately
permits "values": null. So values is a double option: the outer level
is present-vs-absent, the inner is null-vs-array. Without that
distinction a schema-valid {"values": null} re-emits as {}, which
satisfies neither branch of the oneOf and is rejected by a validator.
Fields§
§values: Option<Option<MaterialValues>>§value: Option<usize>§other: HashMap<String, Value>The per-theme material object names value and values and declares
no additionalProperties: false, so anything further is legal
CityJSON and is kept rather than dropped.
Trait Implementations§
Source§impl Clone for MaterialReference
impl Clone for MaterialReference
Source§fn clone(&self) -> MaterialReference
fn clone(&self) -> MaterialReference
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MaterialReference
impl Debug for MaterialReference
Source§impl<'de> Deserialize<'de> for MaterialReference
impl<'de> Deserialize<'de> for MaterialReference
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MaterialReference
impl PartialEq for MaterialReference
Source§impl Serialize for MaterialReference
impl Serialize for MaterialReference
impl StructuralPartialEq for MaterialReference
Auto Trait Implementations§
impl Freeze for MaterialReference
impl RefUnwindSafe for MaterialReference
impl Send for MaterialReference
impl Sync for MaterialReference
impl Unpin for MaterialReference
impl UnsafeUnpin for MaterialReference
impl UnwindSafe for MaterialReference
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more