facet_reflect/poke/
mod.rs

1//! Allows mutating values through reflection.
2//!
3//! This module provides the [`Poke`] type for mutating values at runtime.
4//! Unlike [`Peek`](crate::Peek) which provides read-only access, `Poke` allows
5//! modifying struct fields, enum variant data, and collection elements.
6//!
7//! # Safety
8//!
9//! Mutation through reflection is only safe for Plain Old Data (POD) types -
10//! types that have no invariants. A type is POD if:
11//!
12//! - It's a primitive (`u32`, `bool`, `char`, etc.), OR
13//! - It's marked with `#[facet(pod)]`
14//!
15//! Attempting to create a `Poke` for a non-POD type will fail.
16
17mod value;
18pub use value::*;
19
20mod struct_;
21pub use struct_::*;
22
23mod enum_;
24pub use enum_::*;