pub enum ArrayTypeKind {
Array {
non_empty: bool,
key: Box<TypeKind>,
value: Box<TypeKind>,
known_size: Option<usize>,
},
List {
non_empty: bool,
value: Box<TypeKind>,
known_size: Option<usize>,
},
CallableArray,
Shape(ArrayShape),
}Expand description
Represents array types, including specialized arrays like lists and shapes.
Variants§
Array
An array with specified key and value types.
For example, array<string, int> represents an array with string keys and int values.
Fields
List
A list (array with integer keys starting from zero) with a specified value type.
For example, list<string> represents a list of strings.
Fields
CallableArray
A callable array, representing an array that can be called as a function.
Shape(ArrayShape)
An array shape with specified properties and optional additional properties.
For example, shape{ foo: string, bar: int, ... }.
Trait Implementations§
Source§impl Clone for ArrayTypeKind
impl Clone for ArrayTypeKind
Source§fn clone(&self) -> ArrayTypeKind
fn clone(&self) -> ArrayTypeKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArrayTypeKind
impl Debug for ArrayTypeKind
Source§impl<'de> Deserialize<'de> for ArrayTypeKind
impl<'de> Deserialize<'de> for ArrayTypeKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ArrayTypeKind
impl Hash for ArrayTypeKind
Source§impl Ord for ArrayTypeKind
impl Ord for ArrayTypeKind
Source§fn cmp(&self, other: &ArrayTypeKind) -> Ordering
fn cmp(&self, other: &ArrayTypeKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ArrayTypeKind
impl PartialEq for ArrayTypeKind
Source§impl PartialOrd for ArrayTypeKind
impl PartialOrd for ArrayTypeKind
Source§impl Serialize for ArrayTypeKind
impl Serialize for ArrayTypeKind
impl Eq for ArrayTypeKind
impl StructuralPartialEq for ArrayTypeKind
Auto Trait Implementations§
impl Freeze for ArrayTypeKind
impl RefUnwindSafe for ArrayTypeKind
impl Send for ArrayTypeKind
impl Sync for ArrayTypeKind
impl Unpin for ArrayTypeKind
impl UnwindSafe for ArrayTypeKind
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