Safety

Trait Safety 

Source
pub trait Safety {
    const IS_SAFE: bool;
}
Expand description

Type-level marker trait for function safety, either Safe or Unsafe.

Required Associated Constants§

Source

const IS_SAFE: bool

true for safe functions, false for unsafe ones.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Safety for Safe

Source§

const IS_SAFE: bool = true

Source§

impl Safety for Unsafe

Source§

const IS_SAFE: bool = false