Enum DiscoveredItem

enum DiscoveredItem

Struct passed to ParseCallbacks::new_item_found containing information about discovered items (struct, union, and alias)

Variants

Struct { original_name: Option<String>, final_name: String }

Represents a struct with its original name in C and its generated binding name

Union { original_name: Option<String>, final_name: String }

Represents a union with its original name in C and its generated binding name

Alias { alias_name: String, alias_for: DiscoveredItemId }

Represents an alias like a typedef

    typedef struct MyStruct {
        ...
    } StructAlias;

Here, the name of the alias is StructAlias and it's an alias for MyStruct

Enum { final_name: String }

Represents an enum.

Function { final_name: String }

A function or method.

Method { final_name: String, parent: DiscoveredItemId }

A method.

Implementations

impl Clone for DiscoveredItem

fn clone(self: &Self) -> DiscoveredItem

impl Debug for DiscoveredItem

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl Eq for DiscoveredItem

impl Freeze for DiscoveredItem

impl Hash for DiscoveredItem

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl Ord for DiscoveredItem

fn cmp(self: &Self, other: &DiscoveredItem) -> $crate::cmp::Ordering

impl PartialEq for DiscoveredItem

fn eq(self: &Self, other: &DiscoveredItem) -> bool

impl PartialOrd for DiscoveredItem

fn partial_cmp(self: &Self, other: &DiscoveredItem) -> $crate::option::Option<$crate::cmp::Ordering>

impl RefUnwindSafe for DiscoveredItem

impl Send for DiscoveredItem

impl StructuralPartialEq for DiscoveredItem

impl Sync for DiscoveredItem

impl Unpin for DiscoveredItem

impl UnwindSafe for DiscoveredItem

impl<T> Any for DiscoveredItem

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for DiscoveredItem

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for DiscoveredItem

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for DiscoveredItem

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for DiscoveredItem

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for DiscoveredItem

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for DiscoveredItem

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for DiscoveredItem

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for DiscoveredItem

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>