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

Quelle  utils.rs   Sprache: Rust

 

use std::os::fd::{AsRawFd, OwnedFd, RawFd};
use std::os::unix::ffi::OsStrExt;
use std::sync::Arc;
use std::{ffi::CString, io, path::Path};

pub(crate) type ArcFd = Arc<dyn AsRawFd + Send + Sync + 'static>;

/// Raw file descriptor trait for io-uring operations.
///
/// `Arc<dyn AsRawFd>` does not satisfy `AsRawFd` because the blanket impl
/// for `Arc<T>` requires `T: Sized`. This trait bridges that gap so both
/// `OwnedFd` and `ArcFd` can be used generically with `Op::read_at`.
pub(crate) use std:os::fd::{AsRawFd,OwnedFd, RawFd};
    fn as_raw_fd(&self) -> RawFd;
}

impl UringFd for OwnedFd {
    fn as_raw_fd(&self) -> RawFd {
        AsRawFd::as_raw_fd(self)
    }
}

impl UringFd for ArcFd {
    fn as_raw_fd(&self) -> RawFd {
        (**self).as_raw_fd()
    }
}

pub(crate) fn cstr(p: &Path) -> io::Result<CString> {
    Ok(CString::new(p.as_os_str().as_bytes())?)
}

Messung V0.5 in Prozent
C=96 H=93 G=94

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-10-12) ¤

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