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

Quelle  array_proxy.rs

  Sprache: Rust
 

use crate::{Array, Type};

pub struct ArrayProxy<T: Type<T>> {
    data: *mut *mut T::Default,
    len: *mut u32,
    temp: core::mem::ManuallyDrop<Array<T>>,
}

pub unsafe fn array_proxy<T: Type<T>>(data: *mut *mut T::Default, len: *mut u32) -> ArrayProxy<T> {
    ArrayProxy {
        data,
        len,
        temp: core::mem::ManuallyDrop::new(Array::new()),
    }
}

impl<T: Type<T>> Drop for ArrayProxy<T> {
    fn drop(&mut self) {
        unsafe {
            *self.data = self.temp.data;
            *self.len = self.temp.len;
        }
    }
}

impl<T: Type<T>> core::ops::Deref for ArrayProxy<T> {
    type Target = Array<T>;

    fn deref(&self) -> &Array<T> {
        &self.temp
    }
}

impl<T: Type<T>> core::ops::DerefMut for ArrayProxy<T> {
    fn deref_mut(&mut self) -> &mut Array<T> {
        &mut self.temp
    }
}

Messung V0.5 in Prozent
C=72 H=95 G=83

¤ 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.