Struct nvim_utils::prelude::LuaDeserializeOptions
source · #[non_exhaustive]pub struct LuaDeserializeOptions {
pub deny_unsupported_types: bool,
pub deny_recursive_tables: bool,
}Expand description
A struct with options to change default deserializer behavior.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.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) -> Options
pub const fn deny_unsupported_types(self, enabled: bool) -> Options
Sets deny_unsupported_types option.
sourcepub const fn deny_recursive_tables(self, enabled: bool) -> Options
pub const fn deny_recursive_tables(self, enabled: bool) -> Options
Sets deny_recursive_tables option.