pub struct Generator { /* private fields */ }
Expand description
Generates Veecle OS code from a CAN-DBC file.
Implementations§
Source§impl Generator
impl Generator
Sourcepub fn new(context: &str, options: Options, input: &str) -> Self
pub fn new(context: &str, options: Options, input: &str) -> Self
Constructs a new Generator
for the given CAN-DBC input
.
context
should be some kind of identifier for error messages, e.g. the source filename.
Sourcepub fn try_into_token_stream(self) -> Result<TokenStream>
pub fn try_into_token_stream(self) -> Result<TokenStream>
Converts the input into a TokenStream
, returning any parsing or semantic errors.
Sourcepub fn into_token_stream(self) -> TokenStream
pub fn into_token_stream(self) -> TokenStream
Converts the input into a TokenStream
, converting any error into a generated compile_error!
.
Sourcepub fn try_into_string(self) -> Result<String>
pub fn try_into_string(self) -> Result<String>
Converts the input into a formatted code String
, returning any parsing or semantic errors.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Converts the input into a formatted code String
, converting any error into a generated compile_error!
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Generator
impl !RefUnwindSafe for Generator
impl !Send for Generator
impl !Sync for Generator
impl Unpin for Generator
impl !UnwindSafe for Generator
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