pub struct SchemaIr {
pub datasource: Option<DatasourceIr>,
pub generator: Option<GeneratorIr>,
pub models: HashMap<String, ModelIr>,
pub enums: HashMap<String, EnumIr>,
pub composite_types: HashMap<String, CompositeTypeIr>,
}Expand description
Validated intermediate representation of a complete schema.
Fields§
§datasource: Option<DatasourceIr>The datasource declaration (if present).
generator: Option<GeneratorIr>The generator declaration (if present).
models: HashMap<String, ModelIr>All models in the schema, indexed by logical name.
enums: HashMap<String, EnumIr>All enums in the schema, indexed by logical name.
composite_types: HashMap<String, CompositeTypeIr>All composite types in the schema, indexed by logical name.
Implementations§
Source§impl SchemaIr
impl SchemaIr
Sourcepub fn get_composite_type(&self, name: &str) -> Option<&CompositeTypeIr>
pub fn get_composite_type(&self, name: &str) -> Option<&CompositeTypeIr>
Gets a composite type by logical name.
Trait Implementations§
impl StructuralPartialEq for SchemaIr
Auto Trait Implementations§
impl Freeze for SchemaIr
impl RefUnwindSafe for SchemaIr
impl Send for SchemaIr
impl Sync for SchemaIr
impl Unpin for SchemaIr
impl UnsafeUnpin for SchemaIr
impl UnwindSafe for SchemaIr
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