WithUnsafeFlag

Trait WithUnsafeFlag 

Source
pub trait WithUnsafeFlag: Sized {
    // Required methods
    fn is_unsafe(&self) -> bool;
    fn set_unsafe(&mut self);

    // Provided methods
    fn with_unsafe(self) -> Self { ... }
    fn write_unsafe(&self, b: &mut CodeBuffer) { ... }
}
Expand description

An element with an unsafe flag.

Required Methods§

Source

fn is_unsafe(&self) -> bool

Gets the unsafe flag.

Source

fn set_unsafe(&mut self)

Sets the unsafe flag.

Provided Methods§

Source

fn with_unsafe(self) -> Self

Sets the unsafe flag.

Source

fn write_unsafe(&self, b: &mut CodeBuffer)

Writes the optional unsafe flag.

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§