Struct mlua::DeserializeOptions
source · [−]#[non_exhaustive]pub struct DeserializeOptions {
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: 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
sourceimpl 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 fn deny_recursive_tables(self, enabled: bool) -> Self
pub 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more