Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/toolkit/library/buildid_reader/src/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  result.rs

  Sprache: Rust
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */


use std::path::PathBuf;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    // NS_ERROR_INVALID_ARG
    #[error("failed to open {}: {source}", .path.display())]
    FailedToOpenFile {
        path: PathBuf,
        source: std::io::Error,
    },
    // NS_ERROR_OUT_OF_MEMORY
    #[error("failed to read buffer of size {size}: {source}")]
    FailedToRead { size: usize, source: std::io::Error },
    // NS_ERROR_NOT_AVAILABLE
    #[error("failed to convert to string from bytes: {0}")]
    StringFromBytesNulError(#[from] std::ffi::FromBytesUntilNulError),
    // NS_ERROR_NOT_AVAILABLE
    #[error("failed to convert to string from bytes: {0}")]
    StringFromBytesUtf8Error(#[from] std::str::Utf8Error),
    #[error("failed to {action}: {source}")]
    Goblin {
        action: &'static str,
        source: goblin::error::Error,
    },
    #[error("failed to copy {count} bytes at {offset}: {source}")]
    CopyBytes {
        offset: usize,
        count: usize,
        source: std::io::Error,
    },
    #[error("failed to find note")]
    NoteNotAvailable,
    // NS_ERROR_INVALID_SIGNATURE
    #[error("the note name isn't a valid form")]
    InvalidNoteName,
    #[error("failed to find architecture in fat binary")]
    ArchNotAvailable,
    // NS_ERROR_INVALID_ARG
    #[error("mach file looked like a fat archive but couldn't be parsed as one")]
    NotFatArchive,
    #[error("not enough data provided, expected at least {expected} bytes: {source}")]
    NotEnoughData {
        expected: usize,
        source: std::array::TryFromSliceError,
    },
}

pub type Result<T> = std::result::Result<T, Error>;

Messung V0.5 in Prozent
C=87 H=100 G=93

¤ Dauer der Verarbeitung: 0.4 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.