Struct OpaqueElement
pub struct OpaqueElement(/* private fields */);Expand description
Opaque representation of an Element, for identity comparisons.
Implementations§
§impl OpaqueElement
impl OpaqueElement
pub fn new<T>(ptr: &T) -> OpaqueElement
pub fn new<T>(ptr: &T) -> OpaqueElement
Creates a new OpaqueElement from an arbitrarily-typed pointer.
pub fn from_non_null_ptr(ptr: NonNull<()>) -> OpaqueElement
pub fn from_non_null_ptr(ptr: NonNull<()>) -> OpaqueElement
Creates a new OpaqueElement from a type-erased non-null pointer
pub unsafe fn as_const_ptr<T>(&self) -> *const T
pub unsafe fn as_const_ptr<T>(&self) -> *const T
Returns a const ptr to the contained reference. Unsafe especially since Element can be recovered and potentially-mutated.
Trait Implementations§
§impl Clone for OpaqueElement
impl Clone for OpaqueElement
§fn clone(&self) -> OpaqueElement
fn clone(&self) -> OpaqueElement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OpaqueElement
§impl Debug for OpaqueElement
impl Debug for OpaqueElement
impl Eq for OpaqueElement
§impl Hash for OpaqueElement
impl Hash for OpaqueElement
§impl PartialEq for OpaqueElement
impl PartialEq for OpaqueElement
impl Send for OpaqueElement
impl StructuralPartialEq for OpaqueElement
impl Sync for OpaqueElement
Auto Trait Implementations§
impl Freeze for OpaqueElement
impl RefUnwindSafe for OpaqueElement
impl Unpin for OpaqueElement
impl UnsafeUnpin for OpaqueElement
impl UnwindSafe for OpaqueElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more