Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/deranged/src/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 951 B image not shown  

Quelle  unsafe_wrapper.rs

  Sprache: Rust
 

//! Declaration and implementation of `Unsafe`, which ensures all unsafe operations are correctly
//! placed in unsafe blocks.

/// A value that is safe to use, but is unsafe to construct or mutate.
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub(cratestruct Unsafe<T>(T);

impl<T: core::fmt::Debug> core::fmt::Debug for Unsafe<T> {
    #[inline]
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        self.0.fmt(f)
    }
}

impl<T> Unsafe<T> {
    /// Create a new `Unsafe`, asserting that all invariants are upheld.
    #[inline(always)]
    pub(crateconst unsafe fn new(value: T) -> Self {
        Self(value)
    }

    /// Get a reference to the inner value.
    #[inline(always)]
    pub(crateconst fn get(&self) -> &T {
        &self.0
    }
}

impl<T> core::ops::Deref for Unsafe<T> {
    type Target = T;

    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}

Messung V0.5 in Prozent
C=84 H=96 G=90

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.