pub struct Owned<T: ?Sized> { /* private fields */ }Expand description
Marker type for owned pointers.
An Owned<T> wraps a NonNull<T> and indicates that the holder
is responsible for freeing the underlying object at the end of its lifetime.
§SAFETY
The Drop implementation will free the wrapped pointer using the appropriate
xmlFree* function. The caller must ensure:
- The pointer was allocated by libxml2’s allocator
- No other code holds a mutable reference to the pointed-to data
- The pointer is not freed twice
Auto Trait Implementations§
impl<T> !Send for Owned<T>
impl<T> !Sync for Owned<T>
impl<T> Freeze for Owned<T>
impl<T> RefUnwindSafe for Owned<T>
impl<T> Unpin for Owned<T>
impl<T> UnsafeUnpin for Owned<T>
impl<T> UnwindSafe for Owned<T>
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