A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/trait.EmissionGuarantee.html below:

EmissionGuarantee in rustc_errors - Rust

Trait EmissionGuaranteeSource
pub trait EmissionGuarantee: Sized {
    type EmitResult = Self;

    // Required method
    fn emit_producing_guarantee(diag: Diag<'_, Self>) -> Self::EmitResult;
}
Expand description

Trait for types that Diag::emit can return as a “guarantee” (or “proof”) token that the emission happened.

Source

This exists so that bugs and fatal errors can both result in ! (an abort) when emitted, but have different aborting behaviour.

Source

Implementation of Diag::emit, fully controlled by each impl of EmissionGuarantee, to make it impossible to create a value of Self::EmitResult without actually performing the emission.

This trait is not dyn compatible.

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

Source§

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4