pub struct ExternalAnnotations {
pub functions: HashMap<String, ExternalFunctionAnnotation>,
pub whitelist_patterns: Vec<String>,
pub blacklist_patterns: Vec<String>,
pub profiles: HashMap<String, ExternalProfile>,
pub active_profile: Option<String>,
pub unsafe_scopes: Vec<String>,
pub unsafe_types: Vec<String>,
}Fields§
§functions: HashMap<String, ExternalFunctionAnnotation>§whitelist_patterns: Vec<String>§blacklist_patterns: Vec<String>§profiles: HashMap<String, ExternalProfile>§active_profile: Option<String>§unsafe_scopes: Vec<String>§unsafe_types: Vec<String>Implementations§
Source§impl ExternalAnnotations
impl ExternalAnnotations
pub fn new() -> Self
pub fn from_file(path: &Path) -> Result<Self, String>
pub fn parse_content(&mut self, content: &str) -> Result<(), String>
Sourcepub fn is_type_unsafe(&self, type_name: &str) -> bool
pub fn is_type_unsafe(&self, type_name: &str) -> bool
Check if a type is marked as unsafe_type (internal structure should not be analyzed)
pub fn is_function_safe(&self, func_name: &str) -> Option<bool>
pub fn set_active_profile(&mut self, profile_name: &str) -> Result<(), String>
Trait Implementations§
Source§impl Clone for ExternalAnnotations
impl Clone for ExternalAnnotations
Source§fn clone(&self) -> ExternalAnnotations
fn clone(&self) -> ExternalAnnotations
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExternalAnnotations
impl RefUnwindSafe for ExternalAnnotations
impl Send for ExternalAnnotations
impl Sync for ExternalAnnotations
impl Unpin for ExternalAnnotations
impl UnwindSafe for ExternalAnnotations
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