Struct oo_bindgen::model::FunctionBuilder
source · 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