Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Threema/domain/libthreema/lib/src/utils/     Datei vom 25.3.2026 mit Größe 1 kB image not shown  

Quelle  apply.rs

  Sprache: Rust
 

//! Apply traits for in-place modification.

/// Modify self by applying a provided value.
pub(cratetrait Apply<T>: Sized {
    /// Apply the provided value, modifying self.
    fn apply(&mut self, value: T);

    /// Apply the provided value, modifying and returning self.
    #[inline]
    fn chain_apply(mut self, value: T) -> Self {
        self.apply(value);
        self
    }
}

/// Try modifying self by applying a provided value.
pub(cratetrait TryApply<T>: Sized {
    /// The type returned in the event of an error. If this is returned, self must not have been modified.
    type Error;

    /// Try applying the provided value, modifying self.
    ///
    /// IMPORTANT: In case of an error, self must not be modified!
    fn try_apply(&mut self, value: T) -> Result<(), Self::Error>;

    /// Try applying the provided value, modifying and returning self.
    #[expect(dead_code, reason = "May use later")]
    #[inline]
    fn try_chain_apply(mut self, value: T) -> Result<SelfSelf::Error> {
        self.try_apply(value)?;
        Ok(self)
    }
}

Messung V0.5 in Prozent
C=90 H=99 G=94

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-06-22) ¤

*© 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.