pub struct DefaultPointerOps<Pointer>(_);
Expand description

The PointerOps type used by an Adapter generated by intrusive_adapter!.

Implementations§

source§

impl<Pointer> DefaultPointerOps<Pointer>

source

pub const fn new() -> DefaultPointerOps<Pointer>

Constructs an instance of DefaultPointerOps.

Trait Implementations§

source§

impl<Pointer> Clone for DefaultPointerOps<Pointer>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Pointer> Default for DefaultPointerOps<Pointer>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'a, T: ?Sized> PointerOps for DefaultPointerOps<&'a T>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = &'a T

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> &'a T

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: &'a T) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<T: ?Sized> PointerOps for DefaultPointerOps<Arc<T>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = Arc<T, Global>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> Arc<T>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: Arc<T>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<T: ?Sized> PointerOps for DefaultPointerOps<Box<T>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = Box<T, Global>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> Box<T>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: Box<T>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<'a, T: ?Sized> PointerOps for DefaultPointerOps<Pin<&'a T>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = Pin<&'a T>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> Pin<&'a T>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: Pin<&'a T>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<T: ?Sized> PointerOps for DefaultPointerOps<Pin<Arc<T>>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = Pin<Arc<T, Global>>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> Pin<Arc<T>>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: Pin<Arc<T>>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<T: ?Sized> PointerOps for DefaultPointerOps<Pin<Box<T>>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = Pin<Box<T, Global>>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> Pin<Box<T>>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: Pin<Box<T>>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<T: ?Sized> PointerOps for DefaultPointerOps<Pin<Rc<T>>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = Pin<Rc<T, Global>>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> Pin<Rc<T>>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: Pin<Rc<T>>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<T: ?Sized> PointerOps for DefaultPointerOps<Pin<UnsafeRef<T>>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = Pin<UnsafeRef<T>>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> Pin<UnsafeRef<T>>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: Pin<UnsafeRef<T>>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<T: ?Sized> PointerOps for DefaultPointerOps<Rc<T>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = Rc<T, Global>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> Rc<T>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: Rc<T>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<T: ?Sized> PointerOps for DefaultPointerOps<UnsafeRef<T>>

§

type Value = T

Object type which is inserted into an intrusive collection.
§

type Pointer = UnsafeRef<T>

Pointer type which owns an instance of a value.
source§

unsafe fn from_raw(&self, raw: *const T) -> UnsafeRef<T>

Constructs an owned pointer from a raw pointer. Read more
source§

fn into_raw(&self, ptr: UnsafeRef<T>) -> *const T

Consumes the owned pointer and returns a raw pointer to the owned object.
source§

impl<Pointer> Copy for DefaultPointerOps<Pointer>

Auto Trait Implementations§

§

impl<Pointer> RefUnwindSafe for DefaultPointerOps<Pointer>where Pointer: RefUnwindSafe,

§

impl<Pointer> Send for DefaultPointerOps<Pointer>where Pointer: Send,

§

impl<Pointer> Sync for DefaultPointerOps<Pointer>where Pointer: Sync,

§

impl<Pointer> Unpin for DefaultPointerOps<Pointer>where Pointer: Unpin,

§

impl<Pointer> UnwindSafe for DefaultPointerOps<Pointer>where Pointer: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.