diff options
Diffstat (limited to 'rust/src/types.rs')
| -rw-r--r-- | rust/src/types.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rust/src/types.rs b/rust/src/types.rs index 11934ceb..00c274b7 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -1853,7 +1853,15 @@ impl NamedTypeReference { Self { handle } } - pub fn new<S: BnStrCompatible>( + /// Most people should use this: The core "should" figure out the type ID for you + /// TODO : Check with Peter about what a better description would be + pub fn new(type_class: NamedTypeReferenceClass, mut name: QualifiedName) -> Self { + Self { + handle: unsafe { BNCreateNamedType(type_class, "".as_ptr() as _, &mut name.0) }, + } + } + + pub fn new_with_id<S: BnStrCompatible>( type_class: NamedTypeReferenceClass, type_id: S, mut name: QualifiedName, |
