pub struct FunctionBuilder<'a> { /* private fields */ }
Implementations§
Source§impl<'a> FunctionBuilder<'a>
impl<'a> FunctionBuilder<'a>
pub fn param<T: IntoName, D: Into<DocString<Unvalidated>>, P: Into<FunctionArgument>>( self, name: T, param_type: P, doc: D, ) -> BindResult<Self>
pub fn returns<D: Into<DocString<Unvalidated>>, T: Into<FunctionReturnValue>>( self, return_type: T, doc: D, ) -> BindResult<Self>
pub fn fails_with(self, err: ErrorType<Unvalidated>) -> BindResult<Self>
pub fn doc<D: Into<Doc<Unvalidated>>>(self, doc: D) -> BindResult<Self>
pub fn build(self) -> BindResult<FunctionHandle>
Sourcepub fn build_static<N: IntoName>(
self,
name: N,
) -> BindResult<StaticMethod<Unvalidated>>
pub fn build_static<N: IntoName>( self, name: N, ) -> BindResult<StaticMethod<Unvalidated>>
Build a static method with a different name than the native function
Sourcepub fn build_static_with_same_name(
self,
) -> BindResult<StaticMethod<Unvalidated>>
pub fn build_static_with_same_name( self, ) -> BindResult<StaticMethod<Unvalidated>>
Build a static method with the same name as the native function
Auto Trait Implementations§
impl<'a> Freeze for FunctionBuilder<'a>
impl<'a> RefUnwindSafe for FunctionBuilder<'a>
impl<'a> !Send for FunctionBuilder<'a>
impl<'a> !Sync for FunctionBuilder<'a>
impl<'a> Unpin for FunctionBuilder<'a>
impl<'a> !UnwindSafe for FunctionBuilder<'a>
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