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: bool
If 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: bool
If 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.
Trait Implementations§
impl Copy for Options
Auto Trait Implementations§
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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