Struct binaryninja::types::NamedTypeReference
source · pub struct NamedTypeReference { /* private fields */ }
Implementations§
source§impl NamedTypeReference
impl NamedTypeReference
sourcepub fn new(
type_class: NamedTypeReferenceClass,
name: QualifiedName
) -> Ref<Self>
pub fn new( type_class: NamedTypeReferenceClass, name: QualifiedName ) -> Ref<Self>
Create an NTR to a type that did not come directly from a BinaryView’s types list. That is to say, if you’re referencing a new type you’re GOING to add, use this. You should not assign type ids yourself, that is the responsibility of the BinaryView implementation after your types have been added. Just make sure the names match up and the core will do the id stuff for you.
sourcepub fn new_with_id<S: BnStrCompatible>(
type_class: NamedTypeReferenceClass,
type_id: S,
name: QualifiedName
) -> Ref<Self>
pub fn new_with_id<S: BnStrCompatible>( type_class: NamedTypeReferenceClass, type_id: S, name: QualifiedName ) -> Ref<Self>
Create an NTR to a type with an existing type id, which generally means it came directly
from a BinaryView’s types list and its id was looked up using BinaryView::get_type_id
.
You should not assign type ids yourself: if you use this to reference a type you are going
to create but have not yet created, you may run into problems when giving your types to
a BinaryView.
pub fn name(&self) -> QualifiedName
pub fn id(&self) -> BnString
pub fn class(&self) -> NamedTypeReferenceClass
Trait Implementations§
source§impl Debug for NamedTypeReference
impl Debug for NamedTypeReference
source§impl Hash for NamedTypeReference
impl Hash for NamedTypeReference
source§impl PartialEq for NamedTypeReference
impl PartialEq for NamedTypeReference
source§fn eq(&self, other: &NamedTypeReference) -> bool
fn eq(&self, other: &NamedTypeReference) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToOwned for NamedTypeReference
impl ToOwned for NamedTypeReference
§type Owned = Ref<NamedTypeReference>
type Owned = Ref<NamedTypeReference>
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Eq for NamedTypeReference
impl StructuralPartialEq for NamedTypeReference
Auto Trait Implementations§
impl RefUnwindSafe for NamedTypeReference
impl !Send for NamedTypeReference
impl !Sync for NamedTypeReference
impl Unpin for NamedTypeReference
impl UnwindSafe for NamedTypeReference
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