pub enum Func<'tu, 'ge> {
Clang {
entity: Entity<'tu>,
rust_custom_leafname: Option<Rc<str>>,
gen_env: &'ge GeneratorEnv<'tu>,
},
Desc(Rc<FuncDesc<'tu, 'ge>>),
}
Variants§
Implementations§
Source§impl<'tu, 'ge> Func<'tu, 'ge>
impl<'tu, 'ge> Func<'tu, 'ge>
pub fn new(entity: Entity<'tu>, gen_env: &'ge GeneratorEnv<'tu>) -> Self
pub fn new_ext( entity: Entity<'tu>, rust_custom_leafname: Option<Rc<str>>, gen_env: &'ge GeneratorEnv<'tu>, ) -> Self
pub fn new_desc(desc: FuncDesc<'tu, 'ge>) -> Self
Sourcepub fn set_rust_custom_leafname(
&mut self,
rust_custom_leafname: Option<Rc<str>>,
)
pub fn set_rust_custom_leafname( &mut self, rust_custom_leafname: Option<Rc<str>>, )
Sets custom rust_leafname for this func, used to e.g. disambiguate function names
pub fn rust_custom_leafname(&self) -> Option<&str>
pub fn specialize(self, spec: &FuncSpec) -> Self
pub fn inherit( &mut self, ancestor: &Func<'tu, 'ge>, inherit_config: InheritConfig, )
pub fn inheriting( self, ancestor: &Func<'tu, 'ge>, inherit_config: InheritConfig, ) -> Self
Sourcepub fn is_specialized(&self) -> bool
pub fn is_specialized(&self) -> bool
Returns true if function was specialized
It’s used to add the return type to function identifier because otherwise it will generate identical function names when we specialize only on the return type.
pub fn kind(&self) -> Cow<'_, FuncKind<'tu, 'ge>>
pub fn constness(&self) -> Constness
pub fn is_abstract(&self) -> bool
pub fn is_generic(&self) -> bool
Sourcepub fn doc_comment_overloaded(&self) -> Cow<'_, str>
pub fn doc_comment_overloaded(&self) -> Cow<'_, str>
Like Self::doc_comment, but processes @overload
and @copybrief
directives if possible by copying the corresponding
doccomment
pub fn return_kind(&self) -> ReturnKind
pub fn safety(&self) -> Safety
pub fn is_default_constructor(&self) -> bool
pub fn is_clone(&self) -> bool
pub fn is_no_discard(&self) -> bool
pub fn return_type_ref(&self) -> Cow<'_, TypeRef<'tu, 'ge>>
pub fn has_arguments(&self) -> bool
pub fn num_arguments(&self) -> usize
pub fn arguments(&self) -> Cow<'_, [Field<'tu, 'ge>]>
pub fn generated_types(&self) -> Vec<GeneratedType<'tu, 'ge>>
pub fn identifier(&self) -> String
pub fn matcher(&self) -> FuncMatchProperties<'_>
pub fn rust_body(&self) -> &FuncRustBody
pub fn rust_extern_definition(&self) -> FuncRustExtern
pub fn cpp_body(&self) -> &FuncCppBody
pub fn cfg_attrs(&self) -> Option<(&str, &str)>
Trait Implementations§
Source§impl Element for Func<'_, '_>
impl Element for Func<'_, '_>
fn exclude_kind(&self) -> ExcludeKind
fn is_system(&self) -> bool
fn is_public(&self) -> bool
fn doc_comment(&self) -> Cow<'_, str>
fn cpp_namespace(&self) -> Cow<'_, str>
fn cpp_name(&self, style: CppNameStyle) -> Cow<'_, str>
fn update_debug_struct<'dref, 'a, 'b>( &self, struct_debug: &'dref mut DebugStruct<'a, 'b>, ) -> &'dref mut DebugStruct<'a, 'b>
Source§impl RustElement for Func<'_, '_>
impl RustElement for Func<'_, '_>
fn rust_module(&self) -> SupportedModule
fn rust_name(&self, style: NameStyle) -> Cow<'_, str>
Source§fn rust_leafname(&self, _fish_style: FishStyle) -> Cow<'_, str>
fn rust_leafname(&self, _fish_style: FishStyle) -> Cow<'_, str>
The very last concrete part of the name in Rust Read more
fn rendered_doc_comment( &self, comment_marker: &str, opencv_version: &str, ) -> String
fn rust_module_reference(&self) -> Cow<'_, str>
Source§impl RustNativeGeneratedElement for Func<'_, '_>
impl RustNativeGeneratedElement for Func<'_, '_>
Auto Trait Implementations§
impl<'tu, 'ge> Freeze for Func<'tu, 'ge>
impl<'tu, 'ge> !RefUnwindSafe for Func<'tu, 'ge>
impl<'tu, 'ge> !Send for Func<'tu, 'ge>
impl<'tu, 'ge> !Sync for Func<'tu, 'ge>
impl<'tu, 'ge> Unpin for Func<'tu, 'ge>
impl<'tu, 'ge> !UnwindSafe for Func<'tu, 'ge>
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