pub struct Rglica<T: ?Sized> {
pub ptr: Option<NonNull<T>>,
}Expand description
Rglica is a thin wrapper around a raw, non-owning pointer (NonNull<T>).
This struct provides C++ style raw pointer behavior in Rust.
§Safety
- Not safe at all.
§Notes
- Use with caution — misuse can cause undefined behavior.
- Designed for performance-sensitive code.
Very unsafe — avoid using unless absolutely necessary.
Fields§
§ptr: Option<NonNull<T>>Implementations§
Trait Implementations§
impl<T: ?Sized> Copy for Rglica<T>
impl<T: ?Sized> Send for Rglica<T>
impl<T: ?Sized> Sync for Rglica<T>
Auto Trait Implementations§
impl<T> Freeze for Rglica<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Rglica<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for Rglica<T>where
T: ?Sized,
impl<T> UnwindSafe for Rglica<T>where
T: RefUnwindSafe + ?Sized,
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