Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/object/src/build/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 891 B image not shown  

Quelle  error.rs

  Sprache: Rust
 

use alloc::string::String;
use core::{fmt, result};
#[cfg(feature = "std")]
use std::error;

use crate::{read, write};

/// The error type used within the build module.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Error(pub(super) String);

impl Error {
    pub(superfn new(message: impl Into<String>) -> Self {
        Error(message.into())
    }
}

impl fmt::Display for Error {
    #[inline]
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.write_str(&self.0)
    }
}

#[cfg(feature = "std")]
impl error::Error for Error {}

impl From<read::Error> for Error {
    fn from(error: read::Error) -> Error {
        Error(format!("{}", error))
    }
}

impl From<write::Error> for Error {
    fn from(error: write::Error) -> Error {
        Error(error.0)
    }
}

/// The result type used within the build module.
pub type Result<T> = result::Result<T, Error>;

Messung V0.5 in Prozent
C=71 H=99 G=86

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-18) ¤

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