pub struct FSharpFunctionBuilder { /* private fields */ }Expand description
Fluent builder for FSharpFunction.
Implementations§
Source§impl FSharpFunctionBuilder
impl FSharpFunctionBuilder
Sourcepub fn type_param(self, tp: impl Into<String>) -> Self
pub fn type_param(self, tp: impl Into<String>) -> Self
Add a type parameter.
Sourcepub fn param(self, name: impl Into<String>, ty: Option<FSharpType>) -> Self
pub fn param(self, name: impl Into<String>, ty: Option<FSharpType>) -> Self
Add a parameter (with optional type annotation).
Sourcepub fn returns(self, ty: FSharpType) -> Self
pub fn returns(self, ty: FSharpType) -> Self
Set return type.
Sourcepub fn body(self, expr: FSharpExpr) -> Self
pub fn body(self, expr: FSharpExpr) -> Self
Set the body.
Sourcepub fn build(self) -> FSharpFunction
pub fn build(self) -> FSharpFunction
Finalise.
Auto Trait Implementations§
impl Freeze for FSharpFunctionBuilder
impl RefUnwindSafe for FSharpFunctionBuilder
impl Send for FSharpFunctionBuilder
impl Sync for FSharpFunctionBuilder
impl Unpin for FSharpFunctionBuilder
impl UnsafeUnpin for FSharpFunctionBuilder
impl UnwindSafe for FSharpFunctionBuilder
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