pub struct MatlabBackend { /* private fields */ }Expand description
Backend state for emitting MATLAB source code.
Implementations§
Source§impl MatlabBackend
impl MatlabBackend
Sourcepub fn take_output(&mut self) -> String
pub fn take_output(&mut self) -> String
Take the accumulated output, resetting the buffer.
Sourcepub fn register_class(&mut self, cls: MatlabClassdef)
pub fn register_class(&mut self, cls: MatlabClassdef)
Register a known class definition.
Sourcepub fn emit_file(&mut self, file: &MatlabFile)
pub fn emit_file(&mut self, file: &MatlabFile)
Emit a complete MATLAB file.
Sourcepub fn emit_function(&mut self, fun: &MatlabFunction)
pub fn emit_function(&mut self, fun: &MatlabFunction)
Emit a MATLAB function definition.
Sourcepub fn emit_classdef(&mut self, cls: &MatlabClassdef)
pub fn emit_classdef(&mut self, cls: &MatlabClassdef)
Emit a MATLAB classdef.
Sourcepub fn emit_stmt(&mut self, stmt: &MatlabStmt)
pub fn emit_stmt(&mut self, stmt: &MatlabStmt)
Emit a single MATLAB statement.
Sourcepub fn emit_expr(&mut self, expr: &MatlabExpr) -> String
pub fn emit_expr(&mut self, expr: &MatlabExpr) -> String
Emit a MATLAB expression to a string.
Sourcepub fn emit_expr_pure(&self, expr: &MatlabExpr) -> String
pub fn emit_expr_pure(&self, expr: &MatlabExpr) -> String
Emit a MATLAB expression to a string (pure).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MatlabBackend
impl RefUnwindSafe for MatlabBackend
impl Send for MatlabBackend
impl Sync for MatlabBackend
impl Unpin for MatlabBackend
impl UnsafeUnpin for MatlabBackend
impl UnwindSafe for MatlabBackend
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