diff options
Diffstat (limited to 'rust/src/function.rs')
| -rw-r--r-- | rust/src/function.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs index 1a4add05..c0e00bd1 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -26,7 +26,7 @@ use crate::{ platform::Platform, references::CodeReference, string::*, - symbol::Symbol, + symbol::{Binding, Symbol}, tags::{Tag, TagReference, TagType}, types::{IntegerDisplayType, QualifiedName, Type}, }; @@ -344,6 +344,12 @@ impl Function { } } + /// Returns true when the function's symbol binding marks it as exported. + pub fn is_exported(&self) -> bool { + let symbol = self.symbol(); + matches!(symbol.binding(), Binding::Global | Binding::Weak) + } + pub fn workflow(&self) -> Option<Ref<Workflow>> { unsafe { let workflow = NonNull::new(BNGetWorkflowForFunction(self.handle))?; |
