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
impl Copy for DecodePropertyBehavior
impl Eq for DecodePropertyBehavior
impl StructuralPartialEq for DecodePropertyBehavior
Auto Trait Implementations§
impl Freeze for DecodePropertyBehavior
impl RefUnwindSafe for DecodePropertyBehavior
impl Send for DecodePropertyBehavior
impl Sync for DecodePropertyBehavior
impl Unpin for DecodePropertyBehavior
impl UnwindSafe for DecodePropertyBehavior
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)