pub struct Interpreter<'a> { /* private fields */ }
Expand description
The Interpreter
transforms raw parsed XML schema data into semantically
meaningful Rust-compatible type metadata.
It operates on a Schemas
structure produced by the Parser
and produces a MetaTypes
structure, which is the central format used for
code generation.
This abstraction allows the intermediate schema format to be reshaped into a form suitable for deterministic and idiomatic Rust code generation.
Implementations§
Source§impl<'a> Interpreter<'a>
impl<'a> Interpreter<'a>
Sourcepub fn new(schemas: &'a Schemas) -> Self
pub fn new(schemas: &'a Schemas) -> Self
Create a new Interpreter
instance using the passed schemas
reference.
Sourcepub fn with_typedef<I, T>(self, ident: I, type_: T) -> Result<Self, Error>
pub fn with_typedef<I, T>(self, ident: I, type_: T) -> Result<Self, Error>
Sourcepub fn with_buildin_types(self) -> Result<Self, Error>
pub fn with_buildin_types(self) -> Result<Self, Error>
Sourcepub fn with_default_typedefs(self) -> Result<Self, Error>
pub fn with_default_typedefs(self) -> Result<Self, Error>
Sourcepub fn with_xs_any_type(self) -> Result<Self, Error>
pub fn with_xs_any_type(self) -> Result<Self, Error>
Sourcepub fn with_num_big_int(self) -> Result<Self, Error>
pub fn with_num_big_int(self) -> Result<Self, Error>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Interpreter<'a>
impl<'a> !RefUnwindSafe for Interpreter<'a>
impl<'a> Send for Interpreter<'a>
impl<'a> Sync for Interpreter<'a>
impl<'a> Unpin for Interpreter<'a>
impl<'a> !UnwindSafe for Interpreter<'a>
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