pub struct Format;Expand description
Applies serde-aware rewrites to a single shared type graph.
Use this when the serialized and deserialized wire shape can be represented
by the same exported schema. Exporters should pass this formatter to Specta’s
formatting hook, for example
specta_typescript::Typescript::default().export(&types, specta_serde::Format).
This formatter validates the graph for unified export and applies serde container, variant, and field behavior that affects the exported shape, such as renames, tagging, defaults, flattening, and compatible conversion attrs.
If serde metadata produces different serialize and deserialize shapes, this
formatter returns an error instead of guessing. In that case, use
PhasesFormat.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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