pub struct LinkML {Show 13 fields
pub id: String,
pub name: String,
pub title: String,
pub description: Option<String>,
pub license: Option<String>,
pub see_also: Vec<String>,
pub prefixes: IndexMap<String, String>,
pub default_prefix: String,
pub default_range: Option<String>,
pub imports: Vec<String>,
pub classes: IndexMap<String, ClassDefinition>,
pub slots: IndexMap<String, AttributeDefinition>,
pub enums: IndexMap<String, EnumDefinition>,
}Expand description
The root schema object that contains all LinkML schema definitions
Fields§
§id: StringUnique identifier for the schema
name: StringName of the schema
title: StringTitle of the schema
description: Option<String>Optional description of the schema’s purpose
license: Option<String>Optional license identifier
see_also: Vec<String>List of related resources and references
prefixes: IndexMap<String, String>Mapping of prefix strings to their expanded URI forms
default_prefix: StringDefault prefix to use when none is specified
default_range: Option<String>Default range type for slots
imports: Vec<String>List of imported schemas
classes: IndexMap<String, ClassDefinition>Map of class definitions
slots: IndexMap<String, AttributeDefinition>Map of slot definitions
enums: IndexMap<String, EnumDefinition>Map of enum definitions
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LinkML
impl<'de> Deserialize<'de> for LinkML
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>,
Source§impl From<DataModel> for LinkML
Implements conversion from DataModel to LinkML schema format.
impl From<DataModel> for LinkML
Implements conversion from DataModel to LinkML schema format.
Source§fn from(model: DataModel) -> Self
fn from(model: DataModel) -> Self
Converts a DataModel instance into a LinkML schema.
This conversion process handles:
- Basic schema configuration including ID, prefixes, and name
- Class definitions and their attributes
- Global slots (shared attributes across classes)
- Enumeration definitions
- Import declarations
- Default type configurations
The conversion maintains the hierarchical structure of the data model while adapting it to LinkML’s schema format requirements.
Source§impl From<LinkML> for DataModel
Implements conversion from LinkML schema to DataModel.
impl From<LinkML> for DataModel
Implements conversion from LinkML schema to DataModel.
Source§fn from(linkml: LinkML) -> Self
fn from(linkml: LinkML) -> Self
Converts a LinkML schema into the internal DataModel format.
This conversion handles:
- Schema metadata through FrontMatter configuration
- Classes and their attributes
- Global slots/attributes
- Enumerations
The conversion preserves:
- Prefixes and namespace information
- Class hierarchies and relationships
- Attribute definitions and constraints
- Enumeration values and meanings
impl Eq for LinkML
impl StructuralPartialEq for LinkML
Auto Trait Implementations§
impl Freeze for LinkML
impl RefUnwindSafe for LinkML
impl Send for LinkML
impl Sync for LinkML
impl Unpin for LinkML
impl UnsafeUnpin for LinkML
impl UnwindSafe for LinkML
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.