Struct mlua::DeserializeOptions
source · pub struct DeserializeOptions {
pub deny_unsupported_types: bool,
pub deny_recursive_tables: bool,
}Available on crate feature
serialize only.Expand description
A struct with options to change default deserializer behavior.
Fields§
§deny_unsupported_types: boolIf true, an attempt to serialize types such as Thread, UserData, LightUserData
and Error will cause an error.
Otherwise these types skipped when iterating or serialized as unit type.
Default: true
deny_recursive_tables: boolIf true, an attempt to serialize a recursive table (table that refers to itself) will cause an error. Otherwise subsequent attempts to serialize the same table will be ignored.
Default: true
Implementations§
source§impl Options
impl Options
sourcepub const fn deny_unsupported_types(self, enabled: bool) -> Self
pub const fn deny_unsupported_types(self, enabled: bool) -> Self
Sets deny_unsupported_types option.
sourcepub const fn deny_recursive_tables(self, enabled: bool) -> Self
pub const fn deny_recursive_tables(self, enabled: bool) -> Self
Sets deny_recursive_tables option.