[−][src]Struct asn1rs_model::model::Model
Fields
name: String
imports: Vec<Import>
definitions: Vec<Definition<T>>
Implementations
impl Model<Protobuf>
[src]
pub fn convert_rust_to_protobuf(rust_model: &Model<Rust>) -> Model<Protobuf>
[src]
pub fn definition_to_protobuf(rust: &Rust) -> Protobuf
[src]
pub fn definition_type_to_protobuf_type(rust_type: &RustType) -> ProtobufType
[src]
impl Model<Rust>
[src]
pub fn convert_asn_to_rust(asn_model: &Model<Asn>) -> Model<Rust>
[src]
pub fn definition_to_rust(
name: &str,
asn: &AsnType,
defs: &mut Vec<Definition<Rust>>
)
[src]
name: &str,
asn: &AsnType,
defs: &mut Vec<Definition<Rust>>
)
Converts the given Asn
value to Rust
, adding new Defintion
s as
necessary (inlined types cannot be represented in rust and thus need to
be extracted to their own types).
The returned value is what shall be used to reference to the definition
and can therefore be used to be inserted in the parent element.
The name is expected in a valid and rusty way
pub fn definition_type_to_rust_type(
name: &str,
asn: &AsnType,
defs: &mut Vec<Definition<Rust>>
) -> RustType
[src]
name: &str,
asn: &AsnType,
defs: &mut Vec<Definition<Rust>>
) -> RustType
impl Model<Sql>
[src]
pub fn convert_rust_to_sql(rust_model: &Model<Rust>) -> Model<Sql>
[src]
pub fn rust_struct_to_sql_table(
name: &str,
fields: &[Field],
definitions: &mut Vec<Definition<Sql>>
)
[src]
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>>
)
[src]
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>>
)
[src]
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>>
)
[src]
name: &str,
rust_inner: &RustType,
definitions: &mut Vec<Definition<Sql>>
)
pub fn sql_column_name(name: &str) -> String
[src]
pub fn has_no_column_in_embedded_struct(rust: &RustType) -> bool
[src]
pub fn is_primitive(rust: &RustType) -> bool
[src]
pub fn struct_list_entry_table_name(
struct_name: &str,
field_name: &str
) -> String
[src]
struct_name: &str,
field_name: &str
) -> String
impl Model<Asn>
[src]
pub fn try_from(value: Vec<Token>) -> Result<Self, Error>
[src]
pub fn make_names_nice(&mut self)
[src]
pub fn to_rust(&self) -> Model<Rust>
[src]
Trait Implementations
impl<T: Clone> Clone for Model<T>
[src]
impl<T: Debug> Debug for Model<T>
[src]
impl<T> Default for Model<T>
[src]
impl ToProtobufModel for Model<Rust>
[src]
fn to_protobuf(&self) -> Model<Protobuf>
[src]
impl ToSqlModel for Model<Rust>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Model<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Model<T> where
T: Send,
T: Send,
impl<T> Sync for Model<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Model<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Model<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,