TypeContainer in binaryninja::type_container - Rust

Struct TypeContainer

Source

#[repr(transparent)]

pub struct TypeContainer { pub handle: NonNull<BNTypeContainer>, }
Expand description

A TypeContainer is a generic interface to access various Binary Ninja models that contain types. Types are stored with both a unique id and a unique name.

§handle: NonNull<BNTypeContainer>
Source§
Source

Get an empty type container that contains no types (immutable)

Source

Get an id string for the Type Container. This will be unique within a given analysis session, but may not be globally unique.

Source

Get a user-friendly name for the Type Container.

Source

Get the type of underlying model the Type Container is accessing.

Source

If the Type Container supports mutable operations (add, rename, delete)

Source

Get the Platform object associated with this Type Container. All Type Containers have exactly one associated Platform (as opposed to, e.g. Type Libraries).

Source

Add or update types to a Type Container. If the Type Container already contains a type with the same name as a type being added, the existing type will be replaced with the definition given to this function, and references will be updated in the source model.

Source
Source

Rename a type in the Type Container. All references to this type will be updated (by id) to use the new name.

Returns true if the type was renamed.

Source

Delete a type in the Type Container. Behavior of references to this type is not specified and you may end up with broken references if any still exist.

Returns true if the type was deleted.

Source

Get the unique id of the type in the Type Container with the given name.

If no type with that name exists, returns None.

Source

Get the unique name of the type in the Type Container with the given id.

If no type with that id exists, returns None.

Source

Get the definition of the type in the Type Container with the given id.

If no type with that id exists, returns None.

Source

Get the definition of the type in the Type Container with the given name.

If no type with that name exists, returns None.

Source

Get a mapping of all types in a Type Container.

Source

Get all type ids in a Type Container.

Source

Get all type names in a Type Container.

Source

Get a mapping of all type ids and type names in a Type Container.

Source

Parse a single type and name from a string containing their definition, with knowledge of the types in the Type Container.

  • source - Source code to parse
  • import_dependencies - If Type Library / Type Archive types should be imported during parsing
Source

Parse an entire block of source into types, variables, and functions, with knowledge of the types in the Type Container.

  • source - Source code to parse
  • file_name - Name of the file containing the source (optional: exists on disk)
  • options - String arguments to pass as options, e.g. command line arguments
  • include_dirs - List of directories to include in the header search path
  • auto_type_source - Source of types if used for automatically generated types
  • import_dependencies - If Type Library / Type Archive types should be imported during parsing

§
§
§
§
§
§