pub struct SchemaData {
pub generics: Vec<String>,
pub fields: HashMap<String, SchemaField>,
pub tuple_elements: Option<Vec<TypeNode>>,
}Expand description
Inline payload for Value::Schema, refcounted out of the enum for
the same width rationale as ClosureData: the inner
HashMap<String, SchemaField> keeps a raw-table header that pushes
the enum width into the >100-byte range when stored inline. The
payload rides an Arc (P2-5) so cloning a Value::Schema — which
check_type does on every typed-field access — only bumps a
refcount instead of deep-cloning the field map.
Fields§
§generics: Vec<String>§fields: HashMap<String, SchemaField>§tuple_elements: Option<Vec<TypeNode>>Trait Implementations§
Source§impl Clone for SchemaData
impl Clone for SchemaData
Source§fn clone(&self) -> SchemaData
fn clone(&self) -> SchemaData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SchemaData
impl RefUnwindSafe for SchemaData
impl Send for SchemaData
impl Sync for SchemaData
impl Unpin for SchemaData
impl UnsafeUnpin for SchemaData
impl UnwindSafe for SchemaData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more