pub struct BoxStorage;

Trait Implementations§

source§

impl Default for BoxStorage

source§

fn default() -> BoxStorage

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

impl<T> Dropper<T, BoxStorage> for BoxDrop

source§

unsafe fn drop_node(&mut self, id: BoxPtr<T>)

Drops the given node. Read more
source§

impl<T> Storage<T> for BoxStorage

§

type Node = BoxPtr<T>

Node.
§

type Dropper = BoxDrop

Nodes dropper.
source§

fn allocate_node(&mut self, node: Node<T, Self>) -> Self::Node

Allocates the given node.
source§

unsafe fn release_node(&mut self, id: Self::Node) -> Node<T, Self>

Safety Read more
source§

fn start_dropping(&self) -> Option<Self::Dropper>

Creates a new dropper. Read more
source§

unsafe fn get(&self, id: Self::Node) -> &Node<T, Self>

Safety Read more
source§

unsafe fn get_mut(&mut self, id: Self::Node) -> &mut Node<T, Self>

Safety Read more
source§

unsafe fn insert_node(&mut self, node: Node<T, Self>) -> Self::Node

Inserts the given node into the storage, setting the children parent. Read more
source§

unsafe fn normalize( &self, addr: Address<Self::Node> ) -> Option<Address<Self::Node>>

Normalizes the given address. Read more
source§

unsafe fn leaf_address(&self, addr: Address<Self::Node>) -> Address<Self::Node>

Converts this arbitrary address into a leaf address. Read more
source§

unsafe fn previous_item_address( &self, addr: Address<Self::Node> ) -> Option<Address<Self::Node>>

Get the address of the item located before this address. Read more
source§

unsafe fn previous_front_address( &self, addr: Address<Self::Node> ) -> Option<Address<Self::Node>>

Returns the front address directly preceding the given address. Read more
source§

unsafe fn next_item_address( &self, addr: Address<Self::Node> ) -> Option<Address<Self::Node>>

Get the address of the item located after this address if any. Read more
source§

unsafe fn next_back_address( &self, addr: Address<Self::Node> ) -> Option<Address<Self::Node>>

Safety Read more
source§

unsafe fn next_item_or_back_address( &self, addr: Address<Self::Node> ) -> Option<Address<Self::Node>>

Returns the item address or back address directly following the given address. Read more
source§

unsafe fn address_in<Q: ?Sized>( &self, id: Self::Node, cmp: impl Fn(&T, &Q) -> Ordering, key: &Q ) -> Result<Address<Self::Node>, Address<Self::Node>>

Safety Read more
source§

unsafe fn insert_at( &mut self, root: Option<Self::Node>, addr: Option<Address<Self::Node>>, item: T ) -> (Option<Self::Node>, Option<Address<Self::Node>>)

Inserts the item at the given address. Read more
source§

unsafe fn insert_exactly_at( &mut self, root: Option<Self::Node>, addr: Option<Address<Self::Node>>, item: T, opt_right_id: Option<Self::Node> ) -> (Option<Self::Node>, Option<Address<Self::Node>>)

Inserts the given item exactly at the provided leaf address. Read more
source§

unsafe fn replace_at(&mut self, addr: Address<Self::Node>, item: T) -> T

Replaces the item located at the given address. Read more
source§

unsafe fn remove_at( &mut self, root: Option<Self::Node>, addr: Address<Self::Node> ) -> Option<RemovedItem<T, Self>>

Safety Read more
source§

unsafe fn remove_rightmost_leaf_of(&mut self, id: Self::Node) -> (T, Self::Node)

Remove the rightmost leaf node under the given node. Read more

Auto Trait Implementations§

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