//! Declaration and implementation of `Unsafe`, which ensures all unsafe operations are correctly //! placed in unsafe blocks.
/// A value that is safe to use, but is unsafe to construct or mutate. #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub(crate) structUnsafe<T>(T);
impl<T> Unsafe<T> { /// Create a new `Unsafe`, asserting that all invariants are upheld. #[inline(always)] pub(crate) constunsafefn new(value: T) -> Self { Self(value)
}
/// Get a reference to the inner value. #[inline(always)] pub(crate) constfn get(&self) -> &T {
&self.0
}
}
impl<T> core::ops::Deref forUnsafe<T> { type Target = T;
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.