pub struct IntermediateScalar {
pub name: String,
pub description: Option<String>,
pub specified_by_url: Option<String>,
pub validation_rules: Vec<ValidationRule>,
pub base_type: Option<String>,
}Expand description
Custom scalar type definition in intermediate format.
Custom scalars allow applications to define domain-specific types with validation. Scalars are defined in language SDKs (Python, TypeScript, Java, Go, Rust) and compiled into the schema.
§Example JSON
{
"name": "Email",
"description": "Valid email address",
"specified_by_url": "https://tools.ietf.org/html/rfc5322",
"base_type": "String",
"validation_rules": [
{
"type": "pattern",
"value": {
"pattern": "^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$"
}
}
]
}Fields§
§name: StringScalar name (e.g., “Email”, “Phone”, “ISBN”)
description: Option<String>Scalar description
specified_by_url: Option<String>URL to specification/RFC (GraphQL spec §3.5.1)
validation_rules: Vec<ValidationRule>Built-in validation rules
base_type: Option<String>Base type for type aliases (e.g., “String” for Email scalar)
Trait Implementations§
Source§impl Clone for IntermediateScalar
impl Clone for IntermediateScalar
Source§fn clone(&self) -> IntermediateScalar
fn clone(&self) -> IntermediateScalar
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 IntermediateScalar
impl Debug for IntermediateScalar
Source§impl<'de> Deserialize<'de> for IntermediateScalar
impl<'de> Deserialize<'de> for IntermediateScalar
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 PartialEq for IntermediateScalar
impl PartialEq for IntermediateScalar
Source§impl Serialize for IntermediateScalar
impl Serialize for IntermediateScalar
impl StructuralPartialEq for IntermediateScalar
Auto Trait Implementations§
impl Freeze for IntermediateScalar
impl RefUnwindSafe for IntermediateScalar
impl Send for IntermediateScalar
impl Sync for IntermediateScalar
impl Unpin for IntermediateScalar
impl UnwindSafe for IntermediateScalar
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