pub struct TypedObjectFieldOrigin {
pub name: Ident,
pub source: TypedObjectFieldSource,
pub optional: bool,
pub ty: Type,
}Fields§
§name: Ident§source: TypedObjectFieldSource§optional: boolCarried so the shape collector and codegen build the object’s struct
with the right optional flags — an absent optional must read back
undefined and be omitted by JSON.stringify.
ty: TypeThe field’s declared type, not the source value’s type. They diverge for
an undefined-filled optional field (value is Type::Undefined, declared type is the
real type) and for a literal widened to its hint. The shape collector and
codegen must build the object’s struct — and its TypeInfo — from this so
JSON.stringify serializes by the declared type, not the fill value.
Trait Implementations§
Source§impl Clone for TypedObjectFieldOrigin
impl Clone for TypedObjectFieldOrigin
Source§impl Debug for TypedObjectFieldOrigin
impl Debug for TypedObjectFieldOrigin
Source§impl PartialEq for TypedObjectFieldOrigin
impl PartialEq for TypedObjectFieldOrigin
impl StructuralPartialEq for TypedObjectFieldOrigin
Auto Trait Implementations§
impl Freeze for TypedObjectFieldOrigin
impl RefUnwindSafe for TypedObjectFieldOrigin
impl Send for TypedObjectFieldOrigin
impl Sync for TypedObjectFieldOrigin
impl Unpin for TypedObjectFieldOrigin
impl UnsafeUnpin for TypedObjectFieldOrigin
impl UnwindSafe for TypedObjectFieldOrigin
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