pub struct TypeGenerator {
pub use_lifetimes: bool,
}Expand description
Generates Rust types from linear logic formulas.
Fields§
§use_lifetimes: boolUse explicit lifetime annotations
Implementations§
Source§impl TypeGenerator
impl TypeGenerator
Sourcepub fn generate_owned(&self, formula: &Formula) -> String
pub fn generate_owned(&self, formula: &Formula) -> String
Generate a type with explicit ownership annotation.
Sourcepub fn generate_arg(&self, formula: &Formula, name: &str) -> String
pub fn generate_arg(&self, formula: &Formula, name: &str) -> String
Generate a type signature for a function argument.
Sourcepub fn generate_return(&self, formulas: &[Formula]) -> String
pub fn generate_return(&self, formulas: &[Formula]) -> String
Generate a return type.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeGenerator
impl RefUnwindSafe for TypeGenerator
impl Send for TypeGenerator
impl Sync for TypeGenerator
impl Unpin for TypeGenerator
impl UnsafeUnpin for TypeGenerator
impl UnwindSafe for TypeGenerator
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