pub struct ZigBackend;Expand description
The Zig code generation backend.
Implementations§
Source§impl ZigBackend
impl ZigBackend
Sourcepub fn emit_module(&self, module: &ZigModule) -> String
pub fn emit_module(&self, module: &ZigModule) -> String
Emit source code for a complete Zig module.
Sourcepub fn emit_struct(&self, s: &ZigStruct) -> String
pub fn emit_struct(&self, s: &ZigStruct) -> String
Emit source code for a single Zig struct.
Sourcepub fn compile_name(oxilean_name: &str) -> String
pub fn compile_name(oxilean_name: &str) -> String
Sanitize an OxiLean name for use as a Zig identifier.
Replaces dots and other special characters with underscores,
prepends ox_ if the name starts with a digit or is a Zig keyword.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZigBackend
impl RefUnwindSafe for ZigBackend
impl Send for ZigBackend
impl Sync for ZigBackend
impl Unpin for ZigBackend
impl UnsafeUnpin for ZigBackend
impl UnwindSafe for ZigBackend
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