Struct pschema_rs::shape::shex::ShapeLiteral
source · pub struct ShapeLiteral { /* private fields */ }
Expand description
The ShapeLiteral
struct represents a shape with a label, property ID, and data
type.
Properties:
label
: Thelabel
property is a u8 (unsigned 8-bit integer) that represents a label or identifier for the shape.property_id
:property_id
is a field of typeu32
in theShapeLiteral
struct. It is likely used to identify a specific property of the shape represented by theShapeLiteral
.dtype
:dtype
is a property of theShapeLiteral
struct that represents the data type of the shape. It is of typeDataType
, which is likely an enum that defines the possible data types that the shape can have.
Implementations§
source§impl ShapeLiteral
impl ShapeLiteral
This is an implementation of a constructor function for the ShapeLiteral
struct. The new
function takes three arguments: label
, property_id
, and
dtype
, and returns a new instance of the ShapeLiteral
struct with those
values. The label
parameter is of type u8
and represents the label of the
shape. The property_id
parameter is of type u32
and represents the ID of the
property that the shape is associated with. The dtype
parameter is of type
DataType
and represents the data type of the shape. The Self
keyword refers
to the ShapeLiteral
struct itself.
Trait Implementations§
source§impl Clone for ShapeLiteral
impl Clone for ShapeLiteral
source§fn clone(&self) -> ShapeLiteral
fn clone(&self) -> ShapeLiteral
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ShapeLiteral
impl Debug for ShapeLiteral
source§impl From<ShapeLiteral> for Shape
impl From<ShapeLiteral> for Shape
This is an implementation of the From
trait for the ShapeLiteral
struct,
which allows a ShapeLiteral
object to be converted into a Shape
enum
variant. The From
trait is a Rust language feature that allows for automatic
conversion between types.
source§fn from(value: ShapeLiteral) -> Self
fn from(value: ShapeLiteral) -> Self
source§impl PartialEq<ShapeLiteral> for ShapeLiteral
impl PartialEq<ShapeLiteral> for ShapeLiteral
source§fn eq(&self, other: &ShapeLiteral) -> bool
fn eq(&self, other: &ShapeLiteral) -> bool
self
and other
values to be equal, and is used
by ==
.