pub enum ShapeType {
Primitive(PrimitiveShape),
Array(Vec<PrimitiveShapeType>),
Nested(Map<String, ShapeType>),
}Expand description
Shape types that can be found in a shapes object. Either a primitive, an array containing any type, or a nested shape. If the type is an array, all elements must be the same type
Variants§
Primitive(PrimitiveShape)
Primitive type
Array(Vec<PrimitiveShapeType>)
Nested shape that can only contain primitives
Nested(Map<String, ShapeType>)
Nested shape
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ShapeType
impl<'de> Deserialize<'de> for ShapeType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShapeType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShapeType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ShapeType
impl Serialize for ShapeType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ShapeType
Auto Trait Implementations§
impl Freeze for ShapeType
impl RefUnwindSafe for ShapeType
impl Send for ShapeType
impl Sync for ShapeType
impl Unpin for ShapeType
impl UnwindSafe for ShapeType
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