pub enum ExternalSafety {
Safe,
Unsafe,
}Expand description
Safety level for external functions.
- Safe: Programmer has audited and confirmed the function follows safety rules. Can be called directly from @safe code without @unsafe block.
- Unsafe: Function may have unsafe behavior. Must be called from @unsafe context.
Variants§
Trait Implementations§
Source§impl Clone for ExternalSafety
impl Clone for ExternalSafety
Source§fn clone(&self) -> ExternalSafety
fn clone(&self) -> ExternalSafety
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 moreSource§impl Debug for ExternalSafety
impl Debug for ExternalSafety
Source§impl PartialEq for ExternalSafety
impl PartialEq for ExternalSafety
impl StructuralPartialEq for ExternalSafety
Auto Trait Implementations§
impl Freeze for ExternalSafety
impl RefUnwindSafe for ExternalSafety
impl Send for ExternalSafety
impl Sync for ExternalSafety
impl Unpin for ExternalSafety
impl UnwindSafe for ExternalSafety
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