Struct asn1rs_model::model::Model
source · pub struct Model<T: Target> {
pub name: String,
pub oid: Option<ObjectIdentifier>,
pub imports: Vec<Import>,
pub definitions: Vec<Definition<T::DefinitionType>>,
pub value_references: Vec<ValueReference<T::ValueReferenceType>>,
}
Fields§
§name: String
§oid: Option<ObjectIdentifier>
§imports: Vec<Import>
§definitions: Vec<Definition<T::DefinitionType>>
§value_references: Vec<ValueReference<T::ValueReferenceType>>
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>> )
pub fn rust_data_enum_to_sql_table( name: &str, enumeration: &DataEnum, definitions: &mut Vec<Definition<Sql>> )
pub fn rust_enum_to_sql_enum( name: &str, enumeration: &PlainEnum, definitions: &mut Vec<Definition<Sql>> )
pub fn rust_tuple_struct_to_sql_table( name: &str, rust_inner: &RustType, definitions: &mut Vec<Definition<Sql>> )
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<RS: ResolveState> Model<Asn<RS>>
impl<RS: ResolveState> Model<Asn<RS>>
pub fn make_names_nice(&mut self)
Trait Implementations§
source§impl<T: Clone + Target> Clone for Model<T>where
T::DefinitionType: Clone,
T::ValueReferenceType: Clone,
impl<T: Clone + Target> Clone for Model<T>where T::DefinitionType: Clone, T::ValueReferenceType: Clone,
source§impl<T: Debug + Target> Debug for Model<T>where
T::DefinitionType: Debug,
T::ValueReferenceType: Debug,
impl<T: Debug + Target> Debug for Model<T>where T::DefinitionType: Debug, T::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