#[non_exhaustive]pub enum Shape {
}
Expand description
The type representing the inferred structure
A word of caution: Everything in this crate is “internal API”, but for this type in particular, since it is very central to how json_typegen works, be prepared that major breaking changes may need to be made to this in the future.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bottom
Bottom
represents the absence of any inference information
Any
Any
represents conflicting inference information that can not be
represented by any single shape
Optional(Box<Shape>)
Optional(T)
represents that a value is nullable, or not always present
Null
Equivalent to Optional(Bottom)
, Null
represents optionality with no further information
Bool
StringT
Integer
Floating
VecT
Struct
Fields
§
fields: LinkedHashMap<String, Shape>
Tuple(Vec<Shape>, u64)
MapT
Opaque(String)
Trait Implementations§
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
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