pub enum ShapeRef {
Show 26 variants
Unit,
Bool,
Char,
I8,
I16,
I32,
I64,
I128,
Isize,
U8,
U16,
U32,
U64,
U128,
Usize,
F32,
F64,
String,
Bytes,
Option(Box<ShapeRef>),
Seq(Box<ShapeRef>),
Array {
item: Box<ShapeRef>,
len: usize,
},
Map {
key: Box<ShapeRef>,
value: Box<ShapeRef>,
},
Tuple(Vec<ShapeRef>),
Definition(ShapeId),
Opaque(OpaqueShape),
}Expand description
A reference to a shape node.
Variants§
Unit
Unit shape.
Bool
Boolean shape.
Char
Character shape.
I8
i8 shape.
I16
i16 shape.
I32
i32 shape.
I64
i64 shape.
I128
i128 shape.
Isize
isize shape.
U8
u8 shape.
U16
u16 shape.
U32
u32 shape.
U64
u64 shape.
U128
u128 shape.
Usize
usize shape.
F32
f32 shape.
F64
f64 shape.
String
UTF-8 string shape.
Bytes
Byte buffer shape.
Option(Box<ShapeRef>)
Optional value shape.
Seq(Box<ShapeRef>)
Sequence shape.
Array
Fixed-size array shape.
Map
Map shape.
Tuple(Vec<ShapeRef>)
Tuple shape.
Definition(ShapeId)
Named type definition reference.
Opaque(OpaqueShape)
Shape intentionally left opaque.
Implementations§
Source§impl ShapeRef
impl ShapeRef
Sourcepub fn is_signed_integer(&self) -> bool
pub fn is_signed_integer(&self) -> bool
Return whether this is a signed integer shape.
Sourcepub fn is_unsigned_integer(&self) -> bool
pub fn is_unsigned_integer(&self) -> bool
Return whether this is an unsigned integer shape.
Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Return whether this is any integer shape.
Trait Implementations§
impl Eq for ShapeRef
impl StructuralPartialEq for ShapeRef
Auto Trait Implementations§
impl Freeze for ShapeRef
impl RefUnwindSafe for ShapeRef
impl Send for ShapeRef
impl Sync for ShapeRef
impl Unpin for ShapeRef
impl UnsafeUnpin for ShapeRef
impl UnwindSafe for ShapeRef
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