pub enum SerdeMode {
Serialize,
Deserialize,
Both,
}Expand description
Specifies whether to apply serde transformations for serialization or deserialization
Variants§
Serialize
Apply transformations for serialization (Rust -> JSON/etc)
Deserialize
Apply transformations for deserialization (JSON/etc -> Rust)
Both
Apply transformations for both serialization and deserialization
This mode uses common transformations (like rename, rename_all, skip)
but skips mode-specific attributes (like rename_serialize, skip_serializing).
A field/type is only skipped if it’s skipped in both modes.
Trait Implementations§
impl Copy for SerdeMode
impl Eq for SerdeMode
impl StructuralPartialEq for SerdeMode
Auto Trait Implementations§
impl Freeze for SerdeMode
impl RefUnwindSafe for SerdeMode
impl Send for SerdeMode
impl Sync for SerdeMode
impl Unpin for SerdeMode
impl UnsafeUnpin for SerdeMode
impl UnwindSafe for SerdeMode
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