Struct biheap::bivec::BiVec

source ·
pub struct BiVec<T> { /* private fields */ }

Implementations§

source§

impl<T> BiVec<T>

source

pub fn new() -> Self

source§

impl<T> BiVec<T>

source

pub fn with_capacity(capacity: usize) -> Self

source§

impl<T> BiVec<T>

source

pub fn set_capacity_or_nothing(&mut self, capacity: usize)

source

pub fn trim(&mut self)

source

pub fn clear(&mut self)

source

pub fn reserve(&mut self, add_capacity: usize)

source§

impl<T> BiVec<T>

source

pub fn push_inplace(&mut self, element: &mut Option<(T, T)>)

source

pub fn push(&mut self, a: T, b: T)

source§

impl<T> BiVec<T>

source

pub fn pop(&mut self) -> Option<(T, T)>

pop the last element of the BiVec

source§

impl<T> BiVec<T>

source

pub fn swap_remove( &mut self, first_index: usize, second_index: usize ) -> Option<(T, T)>

source§

impl<T> BiVec<T>

source

pub fn len(&self) -> usize

source

pub fn empty(&self) -> bool

source

pub fn capacity(&self) -> usize

source§

impl<T> BiVec<T>

source

pub fn views_mut(&mut self) -> [&mut [T]; 2]

source

pub fn views(&self) -> [&[T]; 2]

Trait Implementations§

source§

impl<T> Drop for BiVec<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T: Send> Send for BiVec<T>

source§

impl<T: Sync> Sync for BiVec<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for BiVec<T>where T: RefUnwindSafe,

§

impl<T> Unpin for BiVec<T>where T: Unpin,

§

impl<T> UnwindSafe for BiVec<T>where T: UnwindSafe + RefUnwindSafe,

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