pub trait Warning: 'static {
const ID: WarningId;
// Provided methods
fn enabled() -> bool { ... }
fn if_enabled(item: impl FnOnce()) { ... }
fn allow<O>(item: impl FnOnce() -> O) -> O { ... }
fn allow_async<F>(future: F) -> AllowFuture<F>
where F: Future { ... }
}
Required Associated Constants§
Provided Methods§
fn enabled() -> bool
fn if_enabled(item: impl FnOnce())
fn allow<O>(item: impl FnOnce() -> O) -> O
fn allow_async<F>(future: F) -> AllowFuture<F>where
F: Future,
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.