Struct emf_core_base_rs_ffi::collections::NonNullConst [−][src]
#[repr(transparent)]pub struct NonNullConst<T> where
T: ?Sized, { /* fields omitted */ }
A type representing a *const T
but non-zero.
Uses NonNull internally, as such, the same restrictions apply.
Implementations
impl<T> NonNullConst<T>
[src]
impl<T> NonNullConst<T>
[src]pub const fn dangling() -> NonNullConst<T>
[src]
Creates a new NonNullConst
that is dangling, but well-aligned.
impl<T> NonNullConst<T> where
T: ?Sized,
[src]
impl<T> NonNullConst<T> where
T: ?Sized,
[src]pub const unsafe fn new_unchecked(ptr: *const T) -> NonNullConst<T>
[src]
pub fn new(ptr: *const T) -> Option<NonNullConst<T>>
[src]
Creates a new NonNullConst
if ptr
is non-null.
pub unsafe fn into_mut(&self) -> NonNull<T>
[src]
Acquires a mutable version of the pointer.
Safety
It is undefined behavior if the underlying pointer is not already mutable.
pub const fn as_ptr(self) -> *const T
[src]
Acquires the underlying *const
pointer.
pub unsafe fn as_ref(&self) -> &T
[src]
pub const fn cast<U>(self) -> NonNullConst<U>
[src]
Casts to a pointer of another type.
Trait Implementations
impl<T> Clone for NonNullConst<T>
[src]
impl<T> Clone for NonNullConst<T>
[src]fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Copy for NonNullConst<T>
[src]
impl<T> Copy for NonNullConst<T>
[src]impl<T> Debug for NonNullConst<T> where
T: Debug + ?Sized,
[src]
impl<T> Debug for NonNullConst<T> where
T: Debug + ?Sized,
[src]impl<T> Eq for NonNullConst<T> where
T: Eq + ?Sized,
[src]
impl<T> Eq for NonNullConst<T> where
T: Eq + ?Sized,
[src]impl<T> From<&'_ mut [T]> for NonNullConst<T> where
T: Sized,
[src]
impl<T> From<&'_ mut [T]> for NonNullConst<T> where
T: Sized,
[src]impl<T> From<&'_ mut T> for NonNullConst<T> where
T: ?Sized,
[src]
impl<T> From<&'_ mut T> for NonNullConst<T> where
T: ?Sized,
[src]impl<T> From<NonNull<T>> for NonNullConst<T> where
T: ?Sized,
[src]
impl<T> From<NonNull<T>> for NonNullConst<T> where
T: ?Sized,
[src]impl<T> Ord for NonNullConst<T> where
T: Ord + ?Sized,
[src]
impl<T> Ord for NonNullConst<T> where
T: Ord + ?Sized,
[src]impl<T> PartialEq<NonNullConst<T>> for NonNullConst<T> where
T: PartialEq + ?Sized,
[src]
impl<T> PartialEq<NonNullConst<T>> for NonNullConst<T> where
T: PartialEq + ?Sized,
[src]fn eq(&self, other: &NonNullConst<T>) -> bool
[src]
fn ne(&self, other: &NonNullConst<T>) -> bool
[src]
impl<T> PartialOrd<NonNullConst<T>> for NonNullConst<T> where
T: PartialOrd + ?Sized,
[src]
impl<T> PartialOrd<NonNullConst<T>> for NonNullConst<T> where
T: PartialOrd + ?Sized,
[src]fn partial_cmp(&self, other: &NonNullConst<T>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<T> StructuralEq for NonNullConst<T> where
T: ?Sized,
[src]
impl<T> StructuralEq for NonNullConst<T> where
T: ?Sized,
[src]impl<T> StructuralPartialEq for NonNullConst<T> where
T: ?Sized,
[src]
impl<T> StructuralPartialEq for NonNullConst<T> where
T: ?Sized,
[src]Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for NonNullConst<T> where
T: RefUnwindSafe,
impl<T: ?Sized> RefUnwindSafe for NonNullConst<T> where
T: RefUnwindSafe,
impl<T> !Send for NonNullConst<T>
impl<T> !Send for NonNullConst<T>
impl<T> !Sync for NonNullConst<T>
impl<T> !Sync for NonNullConst<T>
impl<T: ?Sized> Unpin for NonNullConst<T>
impl<T: ?Sized> Unpin for NonNullConst<T>
impl<T: ?Sized> UnwindSafe for NonNullConst<T> where
T: RefUnwindSafe,
impl<T: ?Sized> UnwindSafe for NonNullConst<T> where
T: RefUnwindSafe,