Enum rbx_xml::DecodePropertyBehavior
source · #[non_exhaustive]pub enum DecodePropertyBehavior {
IgnoreUnknown,
ReadUnknown,
ErrorOnUnknown,
NoReflection,
}
Expand description
Describes the strategy that rbx_xml should use when deserializing properties.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IgnoreUnknown
Ignores properties that aren’t known by rbx_xml.
The default and safest option. With this set, properties that are newer than the reflection database rbx_xml uses won’t show up when deserializing files.
ReadUnknown
Read properties that aren’t known by rbx_xml.
With this option set, properties that are newer than rbx_xml’s reflection database will show up. It may be problematic to depend on these properties, since rbx_xml may start supporting them with non-reflection specific names at a future date.
ErrorOnUnknown
Returns an error if any properties are found that aren’t known by rbx_xml.
NoReflection
Completely turns off rbx_xml’s reflection database. Property names and types will appear exactly as they are in XML.
This setting is useful for debugging the model format. It leaves the
user to deal with oddities like how Part.FormFactor
is actually
serialized as Part.formFactorRaw
.
Trait Implementations§
source§impl Clone for DecodePropertyBehavior
impl Clone for DecodePropertyBehavior
source§fn clone(&self) -> DecodePropertyBehavior
fn clone(&self) -> DecodePropertyBehavior
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DecodePropertyBehavior
impl Debug for DecodePropertyBehavior
source§impl Hash for DecodePropertyBehavior
impl Hash for DecodePropertyBehavior
source§impl PartialEq for DecodePropertyBehavior
impl PartialEq for DecodePropertyBehavior
source§fn eq(&self, other: &DecodePropertyBehavior) -> bool
fn eq(&self, other: &DecodePropertyBehavior) -> bool
self
and other
values to be equal, and is used
by ==
.