pub struct FSharpBackend { /* private fields */ }Expand description
F# code generation backend.
Implementations§
Source§impl FSharpBackend
impl FSharpBackend
Sourcepub fn with_indent(indent: &str) -> Self
pub fn with_indent(indent: &str) -> Self
Create a backend with a custom indentation string.
Sourcepub fn emit_type(&self, ty: &FSharpType) -> String
pub fn emit_type(&self, ty: &FSharpType) -> String
Emit an FSharpType as F# source text.
Sourcepub fn emit_pattern(&self, pat: &FSharpPattern) -> String
pub fn emit_pattern(&self, pat: &FSharpPattern) -> String
Emit an FSharpPattern as F# source text.
Sourcepub fn emit_expr(&self, expr: &FSharpExpr, depth: usize) -> String
pub fn emit_expr(&self, expr: &FSharpExpr, depth: usize) -> String
Emit an FSharpExpr at a given indentation depth.
Sourcepub fn emit_record(&self, rec: &FSharpRecord) -> String
pub fn emit_record(&self, rec: &FSharpRecord) -> String
Emit a record type declaration.
Sourcepub fn emit_union(&self, union: &FSharpUnion) -> String
pub fn emit_union(&self, union: &FSharpUnion) -> String
Emit a discriminated union type declaration.
Sourcepub fn emit_function(&self, func: &FSharpFunction) -> String
pub fn emit_function(&self, func: &FSharpFunction) -> String
Emit an FSharpFunction as F# source text.
Sourcepub fn emit_module(&self, module: &FSharpModule) -> String
pub fn emit_module(&self, module: &FSharpModule) -> String
Emit an FSharpModule as a complete F# source file.
Trait Implementations§
Source§impl Default for FSharpBackend
impl Default for FSharpBackend
Auto Trait Implementations§
impl Freeze for FSharpBackend
impl RefUnwindSafe for FSharpBackend
impl Send for FSharpBackend
impl Sync for FSharpBackend
impl Unpin for FSharpBackend
impl UnsafeUnpin for FSharpBackend
impl UnwindSafe for FSharpBackend
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