Struct intrusive_collections::DefaultPointerOps

source ·
pub struct DefaultPointerOps<Pointer>(/* private fields */);
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>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

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>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

type Pointer = Arc<T>

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>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

type Pointer = Box<T>

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>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

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>>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

type Pointer = Pin<Arc<T>>

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>>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

type Pointer = Pin<Box<T>>

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>>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

type Pointer = Pin<Rc<T>>

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>>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

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>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

type Pointer = Rc<T>

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>>

source§

type Value = T

Object type which is inserted into an intrusive collection.
source§

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> Freeze for DefaultPointerOps<Pointer>

§

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 T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 T
where 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 T
where T: Clone,

source§

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 T
where U: Into<T>,

source§

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 T
where U: TryFrom<T>,

source§

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.