pub struct PhasesFormat;Expand description
Applies serde-aware rewrites while preserving separate serialize and deserialize shapes.
Use this when serde metadata makes the wire format directional, such as
asymmetric renames, directional skips, #[serde(with = ...)]-style codecs,
#[serde(into = ...)]/#[serde(from = ...)], or explicit Phased
overrides.
Exporters should pass this formatter to Specta’s formatting hook, for
example
specta_typescript::Typescript::default().export(&types, specta_serde::PhasesFormat).
The transformed type graph includes *_Serialize and *_Deserialize named
types for definitions that need to diverge, while unchanged definitions stay
shared. Inline datatype rendering uses the serialize-facing shape; use
select_phase_datatype to inspect either direction explicitly.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PhasesFormat
impl RefUnwindSafe for PhasesFormat
impl Send for PhasesFormat
impl Sync for PhasesFormat
impl Unpin for PhasesFormat
impl UnsafeUnpin for PhasesFormat
impl UnwindSafe for PhasesFormat
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