pub struct SchemaTypeDef {
pub id: TypeId,
pub name: Option<String>,
pub body: SchemaType,
}Expand description
A named type definition inside a SchemaGraph.
The def itself does not carry metadata; metadata lives on the
SchemaType body so there is one source of truth for docs / aliases /
examples / deprecation / role per type.
Fields§
§id: TypeIdStable identifier; unique within the enclosing graph.
name: Option<String>Optional human-readable qualified name (display only).
body: SchemaTypeThe body of this definition. Its metadata envelope is the def’s metadata.
Trait Implementations§
Source§impl Clone for SchemaTypeDef
impl Clone for SchemaTypeDef
Source§fn clone(&self) -> SchemaTypeDef
fn clone(&self) -> SchemaTypeDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SchemaTypeDef
impl Debug for SchemaTypeDef
Source§impl<'de> Deserialize<'de> for SchemaTypeDef
impl<'de> Deserialize<'de> for SchemaTypeDef
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaTypeDef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaTypeDef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SchemaTypeDef
Source§impl FromSchema for SchemaTypeDef
impl FromSchema for SchemaTypeDef
fn from_value(value: &SchemaValue) -> Result<SchemaTypeDef, FromSchemaError>
Source§impl IntoSchema for SchemaTypeDef
impl IntoSchema for SchemaTypeDef
fn type_id() -> TypeId
fn register_in(builder: &mut SchemaBuilder) -> SchemaType
fn to_value(&self) -> SchemaValue
Source§impl PartialEq for SchemaTypeDef
impl PartialEq for SchemaTypeDef
Source§impl Serialize for SchemaTypeDef
impl Serialize for SchemaTypeDef
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 SchemaTypeDef
Auto Trait Implementations§
impl Freeze for SchemaTypeDef
impl RefUnwindSafe for SchemaTypeDef
impl Send for SchemaTypeDef
impl Sync for SchemaTypeDef
impl Unpin for SchemaTypeDef
impl UnsafeUnpin for SchemaTypeDef
impl UnwindSafe for SchemaTypeDef
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