pub struct Model<T>where
T: Target,{
pub name: String,
pub oid: Option<ObjectIdentifier>,
pub imports: Vec<Import, Global>,
pub definitions: Vec<Definition<<T as Target>::DefinitionType>, Global>,
pub value_references: Vec<ValueReference<<T as Target>::ValueReferenceType>, Global>,
}
Fields§
§name: String
§oid: Option<ObjectIdentifier>
§imports: Vec<Import, Global>
§definitions: Vec<Definition<<T as Target>::DefinitionType>, Global>
§value_references: Vec<ValueReference<<T as Target>::ValueReferenceType>, Global>
Implementations§
source§impl Model<Protobuf>
impl Model<Protobuf>
pub fn convert_rust_to_protobuf(rust_model: &Model<Rust>) -> Model<Protobuf>
pub fn definition_to_protobuf(rust: &Rust) -> Protobuf
pub fn definition_type_to_protobuf_type(rust_type: &RustType) -> ProtobufType
source§impl Model<Sql>
impl Model<Sql>
pub fn convert_rust_to_sql(rust_model: &Model<Rust>) -> Model<Sql>
pub fn rust_struct_to_sql_table( name: &str, fields: &[Field], definitions: &mut Vec<Definition<Sql>, Global> )
pub fn rust_data_enum_to_sql_table( name: &str, enumeration: &Enumeration<DataVariant>, definitions: &mut Vec<Definition<Sql>, Global> )
pub fn rust_enum_to_sql_enum( name: &str, enumeration: &Enumeration<String>, definitions: &mut Vec<Definition<Sql>, Global> )
pub fn rust_tuple_struct_to_sql_table( name: &str, rust_inner: &RustType, definitions: &mut Vec<Definition<Sql>, Global> )
pub fn sql_column_name(name: &str) -> String
pub fn sql_definition_name(name: &str) -> String
pub fn has_no_column_in_embedded_struct(rust: &RustType) -> bool
pub fn is_primitive(rust: &RustType) -> bool
pub fn struct_list_entry_table_name( struct_name: &str, field_name: &str ) -> String
source§impl Model<Asn<Unresolved>>
impl Model<Asn<Unresolved>>
source§impl Model<Asn<Unresolved>>
impl Model<Asn<Unresolved>>
source§impl<RS> Model<Asn<RS>>where
RS: ResolveState,
impl<RS> Model<Asn<RS>>where RS: ResolveState,
pub fn make_names_nice(&mut self)
Trait Implementations§
source§impl<T> Clone for Model<T>where
T: Clone + Target,
<T as Target>::DefinitionType: Clone,
<T as Target>::ValueReferenceType: Clone,
impl<T> Clone for Model<T>where T: Clone + Target, <T as Target>::DefinitionType: Clone, <T as Target>::ValueReferenceType: Clone,
source§impl<T> Debug for Model<T>where
T: Debug + Target,
<T as Target>::DefinitionType: Debug,
<T as Target>::ValueReferenceType: Debug,
impl<T> Debug for Model<T>where T: Debug + Target, <T as Target>::DefinitionType: Debug, <T as Target>::ValueReferenceType: Debug,
source§impl ToProtobufModel for Model<Rust>
impl ToProtobufModel for Model<Rust>
fn to_protobuf(&self) -> Model<Protobuf>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Model<T>where <T as Target>::DefinitionType: RefUnwindSafe, <T as Target>::ValueReferenceType: RefUnwindSafe,
impl<T> Send for Model<T>where <T as Target>::DefinitionType: Send, <T as Target>::ValueReferenceType: Send,
impl<T> Sync for Model<T>where <T as Target>::DefinitionType: Sync, <T as Target>::ValueReferenceType: Sync,
impl<T> Unpin for Model<T>where <T as Target>::DefinitionType: Unpin, <T as Target>::ValueReferenceType: Unpin,
impl<T> UnwindSafe for Model<T>where <T as Target>::DefinitionType: UnwindSafe, <T as Target>::ValueReferenceType: UnwindSafe,
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