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§
Sourcefn set_unsafe(&mut self)
fn set_unsafe(&mut self)
Sets the unsafe flag.
Provided Methods§
Sourcefn with_unsafe(self) -> Self
fn with_unsafe(self) -> Self
Sets the unsafe flag.
Sourcefn write_unsafe(&self, b: &mut CodeBuffer)
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.